aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2013-04-12 08:12:50 -0400
committerMichal Marek <mmarek@suse.cz>2013-04-18 08:56:44 -0400
commit6615d6c322a364be45324f553db57545a3b2e95f (patch)
treec06973c0d14476aee388d4e9608f3ecb9efcb2be /scripts
parent6bc6c9409de03987736df58c411c3aa7b5aed051 (diff)
rpm-pkg: Do not package the whole source directory
The source tree can contain lots of uninteresting data like tag or cscope files, packaging which slows down make rpm needlessly. It can also break the build, if the tree contains an unrelated file named *.spec. The downside of this change is that new subdirectories have to be added to the KBUILD_ALLDIRS variable in the top-level Makefile. The upside is that the behavior is more predictable. Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/package/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index d7b328595a7e..b70b33e67f34 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -27,6 +27,10 @@ RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
27 27
28# Remove hyphens since they have special meaning in RPM filenames 28# Remove hyphens since they have special meaning in RPM filenames
29KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE)) 29KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
30# Include only those top-level files that are needed by make, plus the GPL copy
31TAR_CONTENT := $(KBUILD_ALLDIRS) kernel.spec .config .scmversion Makefile \
32 Kbuild Kconfig COPYING $(wildcard localversion*)
33TAR_CONTENT := $(addprefix $(KERNELPATH)/,$(TAR_CONTENT))
30MKSPEC := $(srctree)/scripts/package/mkspec 34MKSPEC := $(srctree)/scripts/package/mkspec
31PREV := set -e; cd -P ..; 35PREV := set -e; cd -P ..;
32 36
@@ -45,7 +49,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE
45 $(MAKE) clean 49 $(MAKE) clean
46 $(PREV) ln -sf $(srctree) $(KERNELPATH) 50 $(PREV) ln -sf $(srctree) $(KERNELPATH)
47 $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion 51 $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion
48 $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/. 52 $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(TAR_CONTENT)
49 $(PREV) rm $(KERNELPATH) 53 $(PREV) rm $(KERNELPATH)
50 rm -f $(objtree)/.scmversion 54 rm -f $(objtree)/.scmversion
51 set -e; \ 55 set -e; \