summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2005-09-11 22:30:22 +0200
committerSam Ravnborg <sam@mars.ravnborg.org>2005-09-11 22:30:22 +0200
commit5bb78269000cf326bfdfa19f79449c02a9158020 (patch)
treef01e30e8d8f015cb0418331da55a459ddcfc9569 /Makefile
parent9fe66dfd8846706ff11ed7990d06c92644973bd8 (diff)
kbuild: rename prepare to archprepare to fix dependency chain
When introducing the generic asm-offsets.h support the dependency chain for the prepare targets was changed. All build scripts expecting include/asm/asm-offsets.h to be made when using the prepare target would broke. With the limited number of prepare targets left in arch Makefiles the trivial solution was to introduce a new arch specific target: archprepare The dependency chain looks like this now: prepare | +--> prepare0 | +--> archprepare | +--> scripts_basic +--> prepare1 | +---> prepare2 | +--> prepare3 So prepare 3 is processed before prepare2 etc. This guaantees that the asm symlink, version.h, scripts_basic are all updated before archprepare is processed. prepare0 which build the asm-offsets.h file will need the actions performed by archprepare. The head target is now named prepare, because users scripts will most likely use that target, but prepare-all has been kept for compatibility. Updated Documentation/kbuild/makefiles.txt. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 15 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 382298f37ad..e90ee6a3eef 100644
--- a/Makefile
+++ b/Makefile
@@ -776,15 +776,20 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
# Error messages still appears in the original language
.PHONY: $(vmlinux-dirs)
-$(vmlinux-dirs): prepare-all scripts
+$(vmlinux-dirs): prepare scripts
$(Q)$(MAKE) $(build)=$@
# Things we need to do before we recursively start building the kernel
-# or the modules are listed in "prepare-all".
-# A multi level approach is used. prepare1 is updated first, then prepare0.
-# prepare-all is the collection point for the prepare targets.
+# or the modules are listed in "prepare".
+# A multi level approach is used. prepareN is processed before prepareN-1.
+# archprepare is used in arch Makefiles and when processed asm symlink,
+# version.h and scripts_basic is processed / created.
-.PHONY: prepare-all prepare prepare0 prepare1 prepare2 prepare3
+# Listed in dependency order
+.PHONY: prepare archprepare prepare0 prepare1 prepare2 prepare3
+
+# prepare-all is deprecated, use prepare as valid replacement
+.PHONY: prepare-all
# prepare3 is used to check if we are building in a separate output directory,
# and if so do:
@@ -813,11 +818,13 @@ ifneq ($(KBUILD_MODULES),)
$(Q)mkdir -p $(MODVERDIR)
endif
-prepare0: prepare prepare1 FORCE
+archprepare: prepare1 scripts_basic
+
+prepare0: archprepare FORCE
$(Q)$(MAKE) $(build)=.
# All the preparing..
-prepare-all: prepare0
+prepare prepare-all: prepare0
# Leave this as default for preprocessing vmlinux.lds.S, which is now
# done in arch/$(ARCH)/kernel/Makefile
@@ -908,7 +915,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
# Target to prepare building external modules
.PHONY: modules_prepare
-modules_prepare: prepare-all scripts
+modules_prepare: prepare scripts
# Target to install modules
.PHONY: modules_install