|author||Sam Ravnborg <firstname.lastname@example.org>||2005-09-11 22:30:22 +0200|
|committer||Sam Ravnborg <email@example.com>||2005-09-11 22:30:22 +0200|
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 <firstname.lastname@example.org>
Diffstat (limited to 'Makefile')
1 files changed, 15 insertions, 8 deletions
@@ -776,15 +776,20 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
# Error messages still appears in the original language
-$(vmlinux-dirs): prepare-all scripts
+$(vmlinux-dirs): prepare scripts
# 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
# 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)
-prepare0: prepare prepare1 FORCE
+archprepare: prepare1 scripts_basic
+prepare0: archprepare FORCE
# All the preparing..
+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
-modules_prepare: prepare-all scripts
+modules_prepare: prepare scripts
# Target to install modules