提交 b003afe3 编写于 作者: M Michal Marek

kbuild: Fix make rpm

make rpm was broken by commit 09155120:
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: N"Zheng, Jiajia" <jiajia.zheng@intel.com>
Signed-off-by: NMichal Marek <mmarek@suse.cz>
上级 6dc0c2f3
...@@ -44,7 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE ...@@ -44,7 +44,7 @@ rpm-pkg rpm: $(objtree)/kernel.spec FORCE
fi fi
$(MAKE) clean $(MAKE) clean
$(PREV) ln -sf $(srctree) $(KERNELPATH) $(PREV) ln -sf $(srctree) $(KERNELPATH)
$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --scm-only > $(objtree)/.scmversion $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion --save-scmversion
$(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/. $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
$(PREV) rm $(KERNELPATH) $(PREV) rm $(KERNELPATH)
rm -f $(objtree)/.scmversion rm -f $(objtree)/.scmversion
......
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
# #
usage() { usage() {
echo "Usage: $0 [--scm-only] [srctree]" >&2 echo "Usage: $0 [--save-scmversion] [srctree]" >&2
exit 1 exit 1
} }
scm_only=false scm_only=false
srctree=. srctree=.
if test "$1" = "--scm-only"; then if test "$1" = "--save-scmversion"; then
scm_only=true scm_only=true
shift shift
fi fi
...@@ -132,7 +132,10 @@ collect_files() ...@@ -132,7 +132,10 @@ collect_files()
} }
if $scm_only; then if $scm_only; then
scm_version if test ! -e .scmversion; then
res=$(scm_version)
echo "$res" >.scmversion
fi
exit exit
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册