aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-07-15 04:36:37 -0400
committerMichal Marek <mmarek@suse.cz>2010-07-21 10:06:05 -0400
commitb003afe32f608b8d9f9a898b36514dfbf374fd3a (patch)
tree1a2da53522eeecafc843a37ffd4ff5663e61a46e /scripts
parent6dc0c2f3384fe543a805922c6a314c7ad25a92fc (diff)
kbuild: Fix make rpm
make rpm was broken by commit 0915512: make clean set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl /bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only > /usr/src/iwlwifi-2.6/.scmversion cat: .scmversion: input file is output file make[1]: *** [rpm] Error 1 Reported-and-tested-by: "Zheng, Jiajia" <jiajia.zheng@intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/package/Makefile2
-rwxr-xr-xscripts/setlocalversion9
2 files changed, 7 insertions, 4 deletions
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 3a681ef25306..d2c29b63adda 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -44,7 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE
44 fi 44 fi
45 $(MAKE) clean 45 $(MAKE) clean
46 $(PREV) ln -sf $(srctree) $(KERNELPATH) 46 $(PREV) ln -sf $(srctree) $(KERNELPATH)
47 $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --scm-only > $(objtree)/.scmversion 47 $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion
48 $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/. 48 $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
49 $(PREV) rm $(KERNELPATH) 49 $(PREV) rm $(KERNELPATH)
50 rm -f $(objtree)/.scmversion 50 rm -f $(objtree)/.scmversion
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index a7b9f7607e13..64a9cb5556cd 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -10,13 +10,13 @@
10# 10#
11 11
12usage() { 12usage() {
13 echo "Usage: $0 [--scm-only] [srctree]" >&2 13 echo "Usage: $0 [--save-scmversion] [srctree]" >&2
14 exit 1 14 exit 1
15} 15}
16 16
17scm_only=false 17scm_only=false
18srctree=. 18srctree=.
19if test "$1" = "--scm-only"; then 19if test "$1" = "--save-scmversion"; then
20 scm_only=true 20 scm_only=true
21 shift 21 shift
22fi 22fi
@@ -132,7 +132,10 @@ collect_files()
132} 132}
133 133
134if $scm_only; then 134if $scm_only; then
135 scm_version 135 if test ! -e .scmversion; then
136 res=$(scm_version)
137 echo "$res" >.scmversion
138 fi
136 exit 139 exit
137fi 140fi
138 141