diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-08-21 03:02:02 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-08-24 18:39:21 -0400 |
commit | 46a63d4b0d79cf9e8afa3879acf9f6cf74a84a08 (patch) | |
tree | d5d4b811eb8f91e1cff4a7a9c41847bada8da8da | |
parent | cdfca821571dfad27434b71cb43e0654667c0fd1 (diff) |
kbuild: pkg: clean up package files/dirs from the top Makefile
I am not a big fan of the $(objtree)/ hack for clean-files/clean-dirs.
These are created in the top of $(objtree), so let's clean them up
from the top Makefile.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | scripts/Makefile | 2 | ||||
-rw-r--r-- | scripts/package/Makefile | 9 |
3 files changed, 5 insertions, 12 deletions
@@ -1386,12 +1386,14 @@ CLEAN_FILES += modules.builtin.modinfo | |||
1386 | 1386 | ||
1387 | # Directories & files removed with 'make mrproper' | 1387 | # Directories & files removed with 'make mrproper' |
1388 | MRPROPER_DIRS += include/config include/generated \ | 1388 | MRPROPER_DIRS += include/config include/generated \ |
1389 | arch/$(SRCARCH)/include/generated .tmp_objdiff | 1389 | arch/$(SRCARCH)/include/generated .tmp_objdiff \ |
1390 | debian/ snap/ tar-install/ | ||
1390 | MRPROPER_FILES += .config .config.old .version \ | 1391 | MRPROPER_FILES += .config .config.old .version \ |
1391 | Module.symvers \ | 1392 | Module.symvers \ |
1392 | signing_key.pem signing_key.priv signing_key.x509 \ | 1393 | signing_key.pem signing_key.priv signing_key.x509 \ |
1393 | x509.genkey extra_certificates signing_key.x509.keyid \ | 1394 | x509.genkey extra_certificates signing_key.x509.keyid \ |
1394 | signing_key.x509.signer vmlinux-gdb.py | 1395 | signing_key.x509.signer vmlinux-gdb.py \ |
1396 | *.spec | ||
1395 | 1397 | ||
1396 | # Directories & files removed with 'make distclean' | 1398 | # Directories & files removed with 'make distclean' |
1397 | DISTCLEAN_DIRS += | 1399 | DISTCLEAN_DIRS += |
diff --git a/scripts/Makefile b/scripts/Makefile index 16bcb8087899..c42891e10ba3 100644 --- a/scripts/Makefile +++ b/scripts/Makefile | |||
@@ -36,4 +36,4 @@ subdir-$(CONFIG_MODVERSIONS) += genksyms | |||
36 | subdir-$(CONFIG_SECURITY_SELINUX) += selinux | 36 | subdir-$(CONFIG_SECURITY_SELINUX) += selinux |
37 | 37 | ||
38 | # Let clean descend into subdirs | 38 | # Let clean descend into subdirs |
39 | subdir- += basic dtc gdb kconfig mod package | 39 | subdir- += basic dtc gdb kconfig mod |
diff --git a/scripts/package/Makefile b/scripts/package/Makefile index ca7f46b562a4..a2d8830f54be 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile | |||
@@ -65,8 +65,6 @@ binrpm-pkg: FORCE | |||
65 | +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \ | 65 | +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \ |
66 | $(UTS_MACHINE) -bb $(objtree)/binkernel.spec | 66 | $(UTS_MACHINE) -bb $(objtree)/binkernel.spec |
67 | 67 | ||
68 | clean-files += $(objtree)/*.spec | ||
69 | |||
70 | deb-pkg: FORCE | 68 | deb-pkg: FORCE |
71 | $(MAKE) clean | 69 | $(MAKE) clean |
72 | $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian | 70 | $(CONFIG_SHELL) $(srctree)/scripts/package/mkdebian |
@@ -82,8 +80,6 @@ bindeb-pkg: FORCE | |||
82 | intdeb-pkg: FORCE | 80 | intdeb-pkg: FORCE |
83 | +$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb | 81 | +$(CONFIG_SHELL) $(srctree)/scripts/package/builddeb |
84 | 82 | ||
85 | clean-dirs += $(objtree)/debian/ | ||
86 | |||
87 | # snap-pkg | 83 | # snap-pkg |
88 | # --------------------------------------------------------------------------- | 84 | # --------------------------------------------------------------------------- |
89 | snap-pkg: FORCE | 85 | snap-pkg: FORCE |
@@ -98,17 +94,12 @@ snap-pkg: FORCE | |||
98 | cd $(objtree)/snap && \ | 94 | cd $(objtree)/snap && \ |
99 | snapcraft --target-arch=$(UTS_MACHINE) | 95 | snapcraft --target-arch=$(UTS_MACHINE) |
100 | 96 | ||
101 | clean-dirs += $(objtree)/snap/ | ||
102 | |||
103 | # tarball targets | 97 | # tarball targets |
104 | # --------------------------------------------------------------------------- | 98 | # --------------------------------------------------------------------------- |
105 | tar%pkg: FORCE | 99 | tar%pkg: FORCE |
106 | $(MAKE) -f $(srctree)/Makefile | 100 | $(MAKE) -f $(srctree)/Makefile |
107 | +$(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@ | 101 | +$(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@ |
108 | 102 | ||
109 | clean-dirs += $(objtree)/tar-install/ | ||
110 | |||
111 | |||
112 | # perf-pkg - generate a source tarball with perf source | 103 | # perf-pkg - generate a source tarball with perf source |
113 | # --------------------------------------------------------------------------- | 104 | # --------------------------------------------------------------------------- |
114 | 105 | ||