From d2aa7bb31f837da330eb3d319a8713c2fd5ea6d0 Mon Sep 17 00:00:00 2001 From: wolf Date: Thu, 25 Feb 1999 12:43:09 +0000 Subject: [PATCH] Fix behaviour of Makefiles when called recursively from other Makefiles. git-svn-id: https://svn.dealii.org/trunk@906 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/source/Makefile | 2 +- deal.II/deal.II/Make.forward-declarations | 4 ++-- deal.II/deal.II/source/Makefile | 4 ++-- deal.II/lac/source/Makefile | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deal.II/base/source/Makefile b/deal.II/base/source/Makefile index 17a5b107f3..d5ac7a0691 100644 --- a/deal.II/base/source/Makefile +++ b/deal.II/base/source/Makefile @@ -45,7 +45,7 @@ clean: #see the Makefile of the deal.II directory for a thorough #description of what happens here ../lib/Makefile.dep: $(cc-files) $(forward-declarations) $(h-files) Makefile -ifeq (0,${MAKELEVEL}) +ifneq (1,${recursive-make-fwd-decl}) @echo ============================ Remaking Makefile @perl ../Make_dep.pl ../lib/liblac $(INCLUDE) $(cc-files) \ > ../lib/Makefile.dep diff --git a/deal.II/deal.II/Make.forward-declarations b/deal.II/deal.II/Make.forward-declarations index b371373523..d5e65025f8 100644 --- a/deal.II/deal.II/Make.forward-declarations +++ b/deal.II/deal.II/Make.forward-declarations @@ -26,12 +26,12 @@ # copy over the file if necessary. # - delete the two temporary files $(forward-declarations): $(filter-out %forward-declarations%,$(h-files)) -ifeq (0,${MAKELEVEL}) +ifneq (1,${recursive-make-fwd-decl}) @echo ============================ Checking $@ @touch $@.old -@cp $@ $@.old > /dev/null 2>&1 @perl $D/deal.II/Make_forward_declarations $(filter-out %forward-declarations.h,$(h-files)) > $@.new - @make --silent $@ + @make --silent recursive-make-fwd-decl=1 $@ @rm $@.old $@.new else ifneq (,$(shell diff $(forward-declarations).old $(forward-declarations).new)) diff --git a/deal.II/deal.II/source/Makefile b/deal.II/deal.II/source/Makefile index 700f14f013..639e8e4192 100644 --- a/deal.II/deal.II/source/Makefile +++ b/deal.II/deal.II/source/Makefile @@ -155,11 +155,11 @@ clean: #critical case, we need to add it by hand. next problem: #the generation of the forward declarations requires a #nested call to 'make', which would then rebuild the -#Makefile.dep, which this rule won't see, wo we end up +#Makefile.dep, which this rule won't see, so we end up #generating it twice. therefore: do nothing if in a nested #make ../lib/Makefile.dep: $(cc-files) $(h-files) $(forward-declarations) Makefile ../Make.global_options -ifeq (0,${MAKELEVEL}) +ifneq (1,${recursive-make-fwd-decl}) @echo ============================ Remaking Makefile @echo "# This Makefile was automatically generated by ../source/Makefile" \ > ../lib/Makefile.dep diff --git a/deal.II/lac/source/Makefile b/deal.II/lac/source/Makefile index 2840b5dc0a..69fac1516e 100644 --- a/deal.II/lac/source/Makefile +++ b/deal.II/lac/source/Makefile @@ -53,7 +53,7 @@ clean: #see the Makefile of the deal.II directory for a thorough #description of what happens here ../lib/Makefile.dep: $(cc-files) $(forward-declarations) $(h-files) Makefile -ifeq (0,${MAKELEVEL}) +ifneq (1,${recursive-make-fwd-decl}) @echo ============================ Remaking Makefile @perl ../Make_dep.pl ../lib/liblac $(INCLUDE) $(cc-files) \ > ../lib/Makefile.dep -- 2.39.5