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/Makefile.modbuiltin | |
| 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/Makefile.modbuiltin')
| -rw-r--r-- | scripts/Makefile.modbuiltin | 55 |
1 files changed, 55 insertions, 0 deletions
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) | ||
