diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-17 10:23:42 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-17 10:23:42 -0500 |
| commit | 5a865c0606eb44d5d12cabb429751c83712183de (patch) | |
| tree | 726d6eaf3b20f30900304bd0cbb6339b423a071f /scripts | |
| parent | 331d9d5958277de27e6ce42247e1cbec54fd1c7e (diff) | |
| parent | 46e75f66677f5094bb51e91f9473128c4e907c7d (diff) | |
Merge branch 'for-33' of git://repo.or.cz/linux-kbuild
* 'for-33' of git://repo.or.cz/linux-kbuild: (29 commits)
net: fix for utsrelease.h moving to generated
gen_init_cpio: fixed fwrite warning
kbuild: fix make clean after mismerge
kbuild: generate modules.builtin
genksyms: properly consider EXPORT_UNUSED_SYMBOL{,_GPL}()
score: add asm/asm-offsets.h wrapper
unifdef: update to upstream revision 1.190
kbuild: specify absolute paths for cscope
kbuild: create include/generated in silentoldconfig
scripts/package: deb-pkg: use fakeroot if available
scripts/package: add KBUILD_PKG_ROOTCMD variable
scripts/package: tar-pkg: use tar --owner=root
Kbuild: clean up marker
net: add net_tstamp.h to headers_install
kbuild: move utsrelease.h to include/generated
kbuild: move autoconf.h to include/generated
drop explicit include of autoconf.h
kbuild: move compile.h to include/generated
kbuild: drop include/asm
kbuild: do not check for include/asm-$ARCH
...
Fixed non-conflicting clean merge of modpost.c as per comments from
Stephen Rothwell (modpost.c had grown an include of linux/autoconf.h
that needed to be changed to generated/autoconf.h)
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Kbuild.include | 6 | ||||
| -rw-r--r-- | scripts/Makefile.lib | 2 | ||||
| -rw-r--r-- | scripts/Makefile.modbuiltin | 55 | ||||
| -rw-r--r-- | scripts/basic/fixdep.c | 10 | ||||
| -rw-r--r-- | scripts/genksyms/keywords.c_shipped | 191 | ||||
| -rw-r--r-- | scripts/genksyms/keywords.gperf | 2 | ||||
| -rwxr-xr-x | scripts/headers.sh | 2 | ||||
| -rw-r--r-- | scripts/kconfig/Makefile | 1 | ||||
| -rw-r--r-- | scripts/kconfig/confdata.c | 24 | ||||
| -rwxr-xr-x | scripts/mkcompile_h | 2 | ||||
| -rw-r--r-- | scripts/mod/modpost.c | 2 | ||||
| -rw-r--r-- | scripts/package/Makefile | 20 | ||||
| -rw-r--r-- | scripts/package/buildtar | 6 | ||||
| -rwxr-xr-x | scripts/tags.sh | 8 | ||||
| -rw-r--r-- | scripts/unifdef.c | 341 |
15 files changed, 429 insertions, 243 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index c67e73ecd5be..ed2773edfe71 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -149,6 +149,12 @@ ld-option = $(call try-run,\ | |||
| 149 | # $(Q)$(MAKE) $(build)=dir | 149 | # $(Q)$(MAKE) $(build)=dir |
| 150 | build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj | 150 | build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj |
| 151 | 151 | ||
| 152 | ### | ||
| 153 | # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj= | ||
| 154 | # Usage: | ||
| 155 | # $(Q)$(MAKE) $(modbuiltin)=dir | ||
| 156 | modbuiltin := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.modbuiltin obj | ||
| 157 | |||
| 152 | # Prefix -I with $(srctree) if it is not an absolute path. | 158 | # Prefix -I with $(srctree) if it is not an absolute path. |
| 153 | # skip if -I has no parameter | 159 | # skip if -I has no parameter |
| 154 | addtree = $(if $(patsubst -I%,%,$(1)), \ | 160 | addtree = $(if $(patsubst -I%,%,$(1)), \ |
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 224d85e72ef1..cd815ac2a50b 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -213,7 +213,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \ | |||
| 213 | 213 | ||
| 214 | # Bzip2 and LZMA do not include size in file... so we have to fake that; | 214 | # Bzip2 and LZMA do not include size in file... so we have to fake that; |
| 215 | # append the size as a 32-bit littleendian number as gzip does. | 215 | # append the size as a 32-bit littleendian number as gzip does. |
| 216 | size_append = /bin/echo -ne $(shell \ | 216 | size_append = printf $(shell \ |
| 217 | dec_size=0; \ | 217 | dec_size=0; \ |
| 218 | for F in $1; do \ | 218 | for F in $1; do \ |
| 219 | fsize=$$(stat -c "%s" $$F); \ | 219 | fsize=$$(stat -c "%s" $$F); \ |
diff --git a/scripts/Makefile.modbuiltin b/scripts/Makefile.modbuiltin new file mode 100644 index 000000000000..102a276f6eea --- /dev/null +++ b/scripts/Makefile.modbuiltin | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | # ========================================================================== | ||
| 2 | # Generating modules.builtin | ||
| 3 | # ========================================================================== | ||
| 4 | |||
| 5 | src := $(obj) | ||
| 6 | |||
| 7 | PHONY := __modbuiltin | ||
| 8 | __modbuiltin: | ||
| 9 | |||
| 10 | -include include/config/auto.conf | ||
| 11 | # tristate.conf sets tristate variables to uppercase 'Y' or 'M' | ||
| 12 | # That way, we get the list of built-in modules in obj-Y | ||
| 13 | -include include/config/tristate.conf | ||
| 14 | |||
| 15 | include scripts/Kbuild.include | ||
| 16 | |||
| 17 | # The filename Kbuild has precedence over Makefile | ||
| 18 | kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) | ||
| 19 | kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile) | ||
| 20 | include $(kbuild-file) | ||
| 21 | |||
| 22 | include scripts/Makefile.lib | ||
| 23 | __subdir-Y := $(patsubst %/,%,$(filter %/, $(obj-Y))) | ||
| 24 | subdir-Y += $(__subdir-Y) | ||
| 25 | subdir-ym := $(sort $(subdir-y) $(subdir-Y) $(subdir-m)) | ||
| 26 | subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) | ||
| 27 | obj-Y := $(addprefix $(obj)/,$(obj-Y)) | ||
| 28 | |||
| 29 | modbuiltin-subdirs := $(patsubst %,%/modules.builtin, $(subdir-ym)) | ||
| 30 | modbuiltin-mods := $(filter %.ko, $(obj-Y:.o=.ko)) | ||
| 31 | modbuiltin-target := $(obj)/modules.builtin | ||
| 32 | |||
| 33 | __modbuiltin: $(modbuiltin-target) $(subdir-ym) | ||
| 34 | @: | ||
| 35 | |||
| 36 | $(modbuiltin-target): $(subdir-ym) FORCE | ||
| 37 | $(Q)(for m in $(modbuiltin-mods); do echo kernel/$$m; done; \ | ||
| 38 | cat /dev/null $(modbuiltin-subdirs)) > $@ | ||
| 39 | |||
| 40 | PHONY += FORCE | ||
| 41 | |||
| 42 | FORCE: | ||
| 43 | |||
| 44 | # Descending | ||
| 45 | # --------------------------------------------------------------------------- | ||
| 46 | |||
| 47 | PHONY += $(subdir-ym) | ||
| 48 | $(subdir-ym): | ||
| 49 | $(Q)$(MAKE) $(modbuiltin)=$@ | ||
| 50 | |||
| 51 | |||
| 52 | # Declare the contents of the .PHONY variable as phony. We keep that | ||
| 53 | # information in a variable se we can use it in if_changed and friends. | ||
| 54 | |||
| 55 | .PHONY: $(PHONY) | ||
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 6bf21f83837d..ea26b23de082 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c | |||
| @@ -16,15 +16,15 @@ | |||
| 16 | * tells make when to remake a file. | 16 | * tells make when to remake a file. |
| 17 | * | 17 | * |
| 18 | * To use this list as-is however has the drawback that virtually | 18 | * To use this list as-is however has the drawback that virtually |
| 19 | * every file in the kernel includes <linux/autoconf.h>. | 19 | * every file in the kernel includes autoconf.h. |
| 20 | * | 20 | * |
| 21 | * If the user re-runs make *config, linux/autoconf.h will be | 21 | * If the user re-runs make *config, autoconf.h will be |
| 22 | * regenerated. make notices that and will rebuild every file which | 22 | * regenerated. make notices that and will rebuild every file which |
| 23 | * includes autoconf.h, i.e. basically all files. This is extremely | 23 | * includes autoconf.h, i.e. basically all files. This is extremely |
| 24 | * annoying if the user just changed CONFIG_HIS_DRIVER from n to m. | 24 | * annoying if the user just changed CONFIG_HIS_DRIVER from n to m. |
| 25 | * | 25 | * |
| 26 | * So we play the same trick that "mkdep" played before. We replace | 26 | * So we play the same trick that "mkdep" played before. We replace |
| 27 | * the dependency on linux/autoconf.h by a dependency on every config | 27 | * the dependency on autoconf.h by a dependency on every config |
| 28 | * option which is mentioned in any of the listed prequisites. | 28 | * option which is mentioned in any of the listed prequisites. |
| 29 | * | 29 | * |
| 30 | * kconfig populates a tree in include/config/ with an empty file | 30 | * kconfig populates a tree in include/config/ with an empty file |
| @@ -73,7 +73,7 @@ | |||
| 73 | * cmd_<target> = <cmdline> | 73 | * cmd_<target> = <cmdline> |
| 74 | * | 74 | * |
| 75 | * and then basically copies the .<target>.d file to stdout, in the | 75 | * and then basically copies the .<target>.d file to stdout, in the |
| 76 | * process filtering out the dependency on linux/autoconf.h and adding | 76 | * process filtering out the dependency on autoconf.h and adding |
| 77 | * dependencies on include/config/my/option.h for every | 77 | * dependencies on include/config/my/option.h for every |
| 78 | * CONFIG_MY_OPTION encountered in any of the prequisites. | 78 | * CONFIG_MY_OPTION encountered in any of the prequisites. |
| 79 | * | 79 | * |
| @@ -324,7 +324,7 @@ static void parse_dep_file(void *map, size_t len) | |||
| 324 | p++; | 324 | p++; |
| 325 | } | 325 | } |
| 326 | memcpy(s, m, p-m); s[p-m] = 0; | 326 | memcpy(s, m, p-m); s[p-m] = 0; |
| 327 | if (strrcmp(s, "include/linux/autoconf.h") && | 327 | if (strrcmp(s, "include/generated/autoconf.h") && |
| 328 | strrcmp(s, "arch/um/include/uml-config.h") && | 328 | strrcmp(s, "arch/um/include/uml-config.h") && |
| 329 | strrcmp(s, ".ver")) { | 329 | strrcmp(s, ".ver")) { |
| 330 | printf(" %s \\\n", s); | 330 | printf(" %s \\\n", s); |
diff --git a/scripts/genksyms/keywords.c_shipped b/scripts/genksyms/keywords.c_shipped index 287467a2e8c7..8060e06798b3 100644 --- a/scripts/genksyms/keywords.c_shipped +++ b/scripts/genksyms/keywords.c_shipped | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* ANSI-C code produced by gperf version 3.0.3 */ | 1 | /* ANSI-C code produced by gperf version 3.0.4 */ |
| 2 | /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ | 2 | /* Command-line: gperf -L ANSI-C -a -C -E -g -H is_reserved_hash -k '1,3,$' -N is_reserved_word -p -t scripts/genksyms/keywords.gperf */ |
| 3 | 3 | ||
| 4 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ | 4 | #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ |
| @@ -34,7 +34,7 @@ struct resword; | |||
| 34 | static const struct resword *is_reserved_word(register const char *str, register unsigned int len); | 34 | static const struct resword *is_reserved_word(register const char *str, register unsigned int len); |
| 35 | #line 5 "scripts/genksyms/keywords.gperf" | 35 | #line 5 "scripts/genksyms/keywords.gperf" |
| 36 | struct resword { const char *name; int token; }; | 36 | struct resword { const char *name; int token; }; |
| 37 | /* maximum key range = 62, duplicates = 0 */ | 37 | /* maximum key range = 64, duplicates = 0 */ |
| 38 | 38 | ||
| 39 | #ifdef __GNUC__ | 39 | #ifdef __GNUC__ |
| 40 | __inline | 40 | __inline |
| @@ -48,39 +48,39 @@ is_reserved_hash (register const char *str, register unsigned int len) | |||
| 48 | { | 48 | { |
| 49 | static const unsigned char asso_values[] = | 49 | static const unsigned char asso_values[] = |
| 50 | { | 50 | { |
| 51 | 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, | 51 | |
