From: Leandro Lucarella Date: Thu, 17 Sep 2009 13:43:13 +0000 (-0300) Subject: Move "all" taget to Lib.mak X-Git-Url: https://git.llucax.com/software/makeit.git/commitdiff_plain/607a5570f89fa881bc045b08a43cfb347a466190 Move "all" taget to Lib.mak To be able to do this, the top-level Build.mak is included in Lib.mak too, because the $(all) variable should be populated before defining the "all" target, so it can have $(all) as a prerequisite. --- diff --git a/Lib.mak b/Lib.mak index 259a659..2be60c5 100644 --- a/Lib.mak +++ b/Lib.mak @@ -240,4 +240,12 @@ $(if $V,,$(if $(setup_build_dir__), \ $(info !! Something changed: $(setup_build_dir__) \ re-building affected files...))) +# Include the Build.mak for this directory +include $T/Build.mak + +# Phony rule to make all the targets (sub-makefiles can append targets to build +# to the $(all) variable). +.PHONY: all +all: $(all) + endif diff --git a/Toplevel.mak b/Toplevel.mak index bcf2b56..03e46c5 100644 --- a/Toplevel.mak +++ b/Toplevel.mak @@ -5,11 +5,3 @@ P := remake # Include the build system library include $T/Lib.mak -# Include the Build.mak for this directory -include $T/Build.mak - -# Phony rule to make all the targets (sub-makefiles can append targets to build -# to the $(all) variable). -.PHONY: all -all: $(all) - diff --git a/subproj/Toplevel.mak b/subproj/Toplevel.mak index 4738f47..6109188 100644 --- a/subproj/Toplevel.mak +++ b/subproj/Toplevel.mak @@ -8,11 +8,3 @@ sinclude $T/Config.mak # Include the build system library include $T/Lib.mak -# Include the Build.mak for this directory -include $T/Build.mak - -# Phony rule to make all the targets (sub-makefiles can append targets to build -# to the $(all) variable). -.PHONY: all -all: $(all) -