aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-12 19:35:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-12 19:35:26 -0400
commit9ead64974b05501bbac0d63a47c99fa786d064ba (patch)
treeb385f49a07e92f5080c8e7219d888935ed46cc80
parent0b80e3adc289de13cc70b33d90812ef136b6ea01 (diff)
parent75bccd881a49d2da796ec0852158f957dc023f61 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes: kbuild: remove unused -r option for module-init-tool depmod kbuild: fix 'make rpm' when CONFIG_LOCALVERSION_AUTO=y and using SCM tree kbuild: fix mkspec to cleanup RPM_BUILD_ROOT kbuild: fix C libary confusion in unifdef.c due to getline()
-rw-r--r--Makefile18
-rw-r--r--scripts/package/Makefile3
-rwxr-xr-xscripts/package/mkspec2
-rw-r--r--scripts/unifdef.c6
4 files changed, 18 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index d04ee0ad1dcc..5a5b82eaaec2 100644
--- a/Makefile
+++ b/Makefile
@@ -904,12 +904,18 @@ localver = $(subst $(space),, $(string) \
904# and if the SCM is know a tag from the SCM is appended. 904# and if the SCM is know a tag from the SCM is appended.
905# The appended tag is determined by the SCM used. 905# The appended tag is determined by the SCM used.
906# 906#
907# Currently, only git is supported. 907# .scmversion is used when generating rpm packages so we do not loose
908# Other SCMs can edit scripts/setlocalversion and add the appropriate 908# the version information from the SCM when we do the build of the kernel
909# checks as needed. 909# from the copied source
910ifdef CONFIG_LOCALVERSION_AUTO 910ifdef CONFIG_LOCALVERSION_AUTO
911 _localver-auto = $(shell $(CONFIG_SHELL) \ 911
912 $(srctree)/scripts/setlocalversion $(srctree)) 912ifeq ($(wildcard .scmversion),)
913 _localver-auto = $(shell $(CONFIG_SHELL) \
914 $(srctree)/scripts/setlocalversion $(srctree))
915else
916 _localver-auto = $(shell cat .scmversion 2> /dev/null)
917endif
918
913 localver-auto = $(LOCALVERSION)$(_localver-auto) 919 localver-auto = $(LOCALVERSION)$(_localver-auto)
914endif 920endif
915 921
@@ -1537,7 +1543,7 @@ quiet_cmd_depmod = DEPMOD $(KERNELRELEASE)
1537 cmd_depmod = \ 1543 cmd_depmod = \
1538 if [ -r System.map -a -x $(DEPMOD) ]; then \ 1544 if [ -r System.map -a -x $(DEPMOD) ]; then \
1539 $(DEPMOD) -ae -F System.map \ 1545 $(DEPMOD) -ae -F System.map \
1540 $(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) -r) \ 1546 $(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) ) \
1541 $(KERNELRELEASE); \ 1547 $(KERNELRELEASE); \
1542 fi 1548 fi
1543 1549
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index 8c6b7b09606a..fa4a0a17b7e0 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -35,9 +35,10 @@ $(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile
35rpm-pkg rpm: $(objtree)/kernel.spec FORCE 35rpm-pkg rpm: $(objtree)/kernel.spec FORCE
36 $(MAKE) clean 36 $(MAKE) clean
37 $(PREV) ln -sf $(srctree) $(KERNELPATH) 37 $(PREV) ln -sf $(srctree) $(KERNELPATH)
38 $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion > $(objtree)/.scmversion
38 $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/. 39 $(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
39 $(PREV) rm $(KERNELPATH) 40 $(PREV) rm $(KERNELPATH)
40 41 rm -f $(objtree)/.scmversion
41 set -e; \ 42 set -e; \
42 $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version 43 $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
43 set -e; \ 44 set -e; \
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index ee448cdc6a2b..3d93f8c81252 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -96,7 +96,7 @@ echo "%endif"
96 96
97echo "" 97echo ""
98echo "%clean" 98echo "%clean"
99echo '#echo -rf $RPM_BUILD_ROOT' 99echo 'rm -rf $RPM_BUILD_ROOT'
100echo "" 100echo ""
101echo "%files" 101echo "%files"
102echo '%defattr (-, root, root)' 102echo '%defattr (-, root, root)'
diff --git a/scripts/unifdef.c b/scripts/unifdef.c
index 552025e72acb..05a31a6c7e1b 100644
--- a/scripts/unifdef.c
+++ b/scripts/unifdef.c
@@ -206,7 +206,7 @@ static void done(void);
206static void error(const char *); 206static void error(const char *);
207static int findsym(const char *); 207static int findsym(const char *);
208static void flushline(bool); 208static void flushline(bool);
209static Linetype getline(void); 209static Linetype get_line(void);
210static Linetype ifeval(const char **); 210static Linetype ifeval(const char **);
211static void ignoreoff(void); 211static void ignoreoff(void);
212static void ignoreon(void); 212static void ignoreon(void);
@@ -512,7 +512,7 @@ process(void)
512 512
513 for (;;) { 513 for (;;) {
514 linenum++; 514 linenum++;
515 lineval = getline(); 515 lineval = get_line();
516 trans_table[ifstate[depth]][lineval](); 516 trans_table[ifstate[depth]][lineval]();
517 debug("process %s -> %s depth %d", 517 debug("process %s -> %s depth %d",
518 linetype_name[lineval], 518 linetype_name[lineval],
@@ -526,7 +526,7 @@ process(void)
526 * help from skipcomment(). 526 * help from skipcomment().
527 */ 527 */
528static Linetype 528static Linetype
529getline(void) 529get_line(void)
530{ 530{
531 const char *cp; 531 const char *cp;
532 int cursym; 532 int cursym;