aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg2005-09-11 15:30:22 -0500
committerSam Ravnborg2005-09-11 15:30:22 -0500
commit5bb78269000cf326bfdfa19f79449c02a9158020 (patch)
treef01e30e8d8f015cb0418331da55a459ddcfc9569 /Makefile
parent9fe66dfd8846706ff11ed7990d06c92644973bd8 (diff)
downloadkernel-5bb78269000cf326bfdfa19f79449c02a9158020.tar.gz
kernel-5bb78269000cf326bfdfa19f79449c02a9158020.tar.xz
kernel-5bb78269000cf326bfdfa19f79449c02a9158020.zip
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 382298f37adf..e90ee6a3eef4 100644
--- a/Makefile
+++ b/Makefile
@@ -776,15 +776,20 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
776# Error messages still appears in the original language 776# Error messages still appears in the original language
777 777
778.PHONY: $(vmlinux-dirs) 778.PHONY: $(vmlinux-dirs)
779$(vmlinux-dirs): prepare-all scripts 779$(vmlinux-dirs): prepare scripts
780 $(Q)$(MAKE) $(build)=$@ 780 $(Q)$(MAKE) $(build)=$@
781 781
782# Things we need to do before we recursively start building the kernel 782# Things we need to do before we recursively start building the kernel
783# or the modules are listed in "prepare-all". 783# or the modules are listed in "prepare".
784# A multi level approach is used. prepare1 is updated first, then prepare0. 784# A multi level approach is used. prepareN is processed before prepareN-1.
785# prepare-all is the collection point for the prepare targets. 785# archprepare is used in arch Makefiles and when processed asm symlink,
786# version.h and scripts_basic is processed / created.
786 787
787.PHONY: prepare-all prepare prepare0 prepare1 prepare2 prepare3 788# Listed in dependency order
789.PHONY: prepare archprepare prepare0 prepare1 prepare2 prepare3
790
791# prepare-all is deprecated, use prepare as valid replacement
792.PHONY: prepare-all
788 793
789# prepare3 is used to check if we are building in a separate output directory, 794# prepare3 is used to check if we are building in a separate output directory,
790# and if so do: 795# and if so do:
@@ -813,11 +818,13 @@ ifneq ($(KBUILD_MODULES),)
813 $(Q)mkdir -p $(MODVERDIR) 818 $(Q)mkdir -p $(MODVERDIR)
814endif 819endif
815 820
816prepare0: prepare prepare1 FORCE 821archprepare: prepare1 scripts_basic
822
823prepare0: archprepare FORCE
817 $(Q)$(MAKE) $(build)=. 824 $(Q)$(MAKE) $(build)=.
818 825
819# All the preparing.. 826# All the preparing..
820prepare-all: prepare0 827prepare prepare-all: prepare0
821 828
822# Leave this as default for preprocessing vmlinux.lds.S, which is now 829# Leave this as default for preprocessing vmlinux.lds.S, which is now
823# done in arch/$(ARCH)/kernel/Makefile 830# done in arch/$(ARCH)/kernel/Makefile
@@ -908,7 +915,7 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
908 915
909# Target to prepare building external modules 916# Target to prepare building external modules
910.PHONY: modules_prepare 917.PHONY: modules_prepare
911modules_prepare: prepare-all scripts 918modules_prepare: prepare scripts
912 919
913# Target to install modules 920# Target to install modules
914.PHONY: modules_install 921.PHONY: modules_install