[WIP PATCH 19/30] scripts/package: mkdebian: modify use of ${srctree} to assume trailing slash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Once converted this script needs to match what the Makefiles have.

Signed-off-by: Elliott Mitchell <ehem+linux@xxxxxxx>
---
---
 scripts/package/builddeb     | 12 ++++++------
 scripts/package/debian/rules |  2 +-
 scripts/package/mkdebian     |  8 ++++----
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index bf96a3c24608..fe0e3cb9bdeb 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -43,11 +43,11 @@ install_linux_image () {
 	rm -rf ${pdir}
 
 	# Only some architectures with OF support have this target
-	if is_enabled CONFIG_OF_EARLY_FLATTREE && [ -d "${srctree}/arch/${SRCARCH}/boot/dts" ]; then
-		${MAKE} -f ${srctree}/Makefile INSTALL_DTBS_PATH="${pdir}/usr/lib/linux-image-${KERNELRELEASE}" dtbs_install
+	if is_enabled CONFIG_OF_EARLY_FLATTREE && [ -d "${srctree}arch/${SRCARCH}/boot/dts" ]; then
+		${MAKE} -f ${srctree}Makefile INSTALL_DTBS_PATH="${pdir}/usr/lib/linux-image-${KERNELRELEASE}" dtbs_install
 	fi
 
-	${MAKE} -f ${srctree}/Makefile INSTALL_MOD_PATH="${pdir}" INSTALL_MOD_STRIP=1 modules_install
+	${MAKE} -f ${srctree}Makefile INSTALL_MOD_PATH="${pdir}" INSTALL_MOD_STRIP=1 modules_install
 	rm -f "${pdir}/lib/modules/${KERNELRELEASE}/build"
 
 	# Install the kernel
@@ -75,7 +75,7 @@ install_linux_image () {
 	*)
 		installed_image_path="boot/vmlinuz-${KERNELRELEASE}";;
 	esac
-	cp "$(${MAKE} -s -f ${srctree}/Makefile image_name)" "${pdir}/${installed_image_path}"
+	cp "$(${MAKE} -s -f ${srctree}Makefile image_name)" "${pdir}/${installed_image_path}"
 
 	# Install the maintainer scripts
 	# Note: hook scripts under /etc/kernel are also executed by official Debian
@@ -142,7 +142,7 @@ install_kernel_headers () {
 
 	rm -rf $pdir
 
-	"${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"
+	"${srctree}scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"
 
 	mkdir -p $pdir/lib/modules/$version/
 	ln -s /usr/src/linux-headers-$version $pdir/lib/modules/$version/build
@@ -153,7 +153,7 @@ install_libc_headers () {
 
 	rm -rf $pdir
 
-	$MAKE -f $srctree/Makefile headers_install INSTALL_HDR_PATH=$pdir/usr
+	$MAKE -f ${srctree}Makefile headers_install INSTALL_HDR_PATH=$pdir/usr
 
 	# move asm headers to /usr/include/<libc-machine>/asm to match the structure
 	# used by Debian-based distros (to support multi-arch)
diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules
index 098307780062..fd4b86c6f25f 100755
--- a/scripts/package/debian/rules
+++ b/scripts/package/debian/rules
@@ -20,7 +20,7 @@ binary: binary-arch binary-indep
 binary-indep: build-indep
 binary-arch: build-arch
 	$(MAKE) $(make-opts) \
-	run-command KBUILD_RUN_COMMAND='+$$(srctree)/scripts/package/builddeb'
+	run-command KBUILD_RUN_COMMAND='+$$(srctree)scripts/package/builddeb'
 
 .PHONY: build build-indep build-arch
 build: build-arch build-indep
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 070149c985fe..dcd5765999e0 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -108,7 +108,7 @@ gen_source ()
 	} > debian/patches/config.patch
 	echo config.patch > debian/patches/series
 
-	"${srctree}/scripts/package/gen-diff-patch" debian/patches/diff.patch
+	"${srctree}scripts/package/gen-diff-patch" debian/patches/diff.patch
 	if [ -s debian/patches/diff.patch ]; then
 		sed -i "
 			1iSubject: Add local diff
@@ -150,7 +150,7 @@ version=$KERNELRELEASE
 if [ -n "$KDEB_PKGVERSION" ]; then
 	packageversion=$KDEB_PKGVERSION
 else
-	packageversion=$(${srctree}/scripts/setlocalversion --no-local ${srctree})-$($srctree/init/build-version)
+	packageversion=$(${srctree}scripts/setlocalversion --no-local ${srctree})-$($srctree/init/build-version)
 fi
 sourcename=${KDEB_SOURCENAME:-linux-upstream}
 
@@ -247,7 +247,7 @@ ARCH := ${ARCH}
 KERNELRELEASE := ${KERNELRELEASE}
 EOF
 
-cp "${srctree}/scripts/package/debian/copyright" debian/
-cp "${srctree}/scripts/package/debian/rules" debian/
+cp "${srctree}scripts/package/debian/copyright" debian/
+cp "${srctree}scripts/package/debian/rules" debian/
 
 exit 0
-- 
2.39.2





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux