]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix behaviour of Makefiles when called recursively from other Makefiles.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 25 Feb 1999 12:43:09 +0000 (12:43 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 25 Feb 1999 12:43:09 +0000 (12:43 +0000)
git-svn-id: https://svn.dealii.org/trunk@906 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/Makefile
deal.II/deal.II/Make.forward-declarations
deal.II/deal.II/source/Makefile
deal.II/lac/source/Makefile

index 17a5b107f397be5bdd4b5c2a37e6df6106069076..d5ac7a06914cbd1e747b1a074eb9f020672668c4 100644 (file)
@@ -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
index b371373523e5dd213efcac396cfc2e9f0a02b57b..d5e65025f83d1bac9bd391e471b1dff479dea68a 100644 (file)
 #   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))
index 700f14f01398c59f6b62b1b26476722d17bd4fec..639e8e4192e5c0d96f4e6ff2bc141ceab99b494c 100644 (file)
@@ -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
index 2840b5dc0ad05c587343cadd69976c06a544e4db..69fac1516e9063f4310802db634f4b896b715973 100644 (file)
@@ -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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.