]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
kbuild: pkg: rename scripts/package/Makefile to scripts/Makefile.package
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 21 Aug 2019 07:02:04 +0000 (16:02 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 24 Aug 2019 22:42:00 +0000 (07:42 +0900)
scripts/package/Makefile does not use $(obj) or $(src) at all.
It actually generates files and directories in the top of $(objtree).
I do not see much sense in descending into scripts/package/.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Makefile
scripts/Makefile.package [moved from scripts/package/Makefile with 99% similarity]

index 69cb3ec35d3c50e1eb214c116b6434c585ea64d4..668e65c47ee1329ed9d924e7ec196da1dd96a9e5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1445,13 +1445,11 @@ distclean: mrproper
 
 # Packaging of the kernel to various formats
 # ---------------------------------------------------------------------------
-package-dir    := scripts/package
 
 %src-pkg: FORCE
-       $(Q)$(MAKE) $(build)=$(package-dir) $@
+       $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
 %pkg: include/config/kernel.release FORCE
-       $(Q)$(MAKE) $(build)=$(package-dir) $@
-
+       $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
 
 # Brief documentation of the typical targets used
 # ---------------------------------------------------------------------------
@@ -1523,7 +1521,7 @@ help:
        @echo '  or  "cd tools; make help"'
        @echo  ''
        @echo  'Kernel packaging:'
-       @$(MAKE) $(build)=$(package-dir) help
+       @$(MAKE) -f $(srctree)/scripts/Makefile.package help
        @echo  ''
        @echo  'Documentation targets:'
        @$(MAKE) -f $(srctree)/Documentation/Makefile dochelp
similarity index 99%
rename from scripts/package/Makefile
rename to scripts/Makefile.package
index 407189d9942a02f9e2ed89b4caefdd3439b0b55f..56eadcc48d46de54acad156db436fecdc085638f 100644 (file)
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 # Makefile for the different targets used to generate full packages of a kernel
-# It uses the generic clean infrastructure of kbuild
+
+include $(srctree)/scripts/Kbuild.include
 
 # RPM target
 # ---------------------------------------------------------------------------
@@ -154,3 +155,5 @@ help:
        @echo '  perf-targz-src-pkg  - Build $(perf-tar).tar.gz source tarball'
        @echo '  perf-tarbz2-src-pkg - Build $(perf-tar).tar.bz2 source tarball'
        @echo '  perf-tarxz-src-pkg  - Build $(perf-tar).tar.xz source tarball'
+
+.PHONY: $(PHONY)