]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Ensure that we only rebuild those parts of the Makefile that are really necessary...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 Nov 2010 06:53:25 +0000 (06:53 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 Nov 2010 06:53:25 +0000 (06:53 +0000)
git-svn-id: https://svn.dealii.org/trunk@22609 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/Makefile

index 8a9ed2b1c5d61a04be74ced5895568de60429b59..5a0b18036d62d67507dd5792698bbf88a3f60f23 100644 (file)
@@ -202,18 +202,28 @@ $(LIBDIR)/libdeal_II$(shared-lib-suffix): $(o-files)
        @$(PERL) $D/common/scripts/lapack_templates.pl ../include/deal.II/lac/lapack_templates.h.in > $@
 
 
+# A rule to make sure the various */Makefile.dep files have the right
+# dependencies on their source files
+Makefile.dep:
+       @for i in $(all-dirs) ; do \
+               echo $$i/Makefile.dep: $$i/*.cc  \
+                                       $(h-files) \
+                                       Makefile \
+                                       $D/common/Make.global_options ; \
+        done >> $@
+       @echo "lac/Makefile.dep: $D/include/deal.II/lac/lapack_templates.h.in \
+                                $D/include/deal.II/lac/lapack_templates.h.in" \
+        >> $@
+include Makefile.dep
+
+
 # Rule to generate the dependency files, one for each source
 # directory. These file are automagically remade whenever needed,
 # i.e. whenever one of the cc-/h-files changed. Make detects whether
 # to remake this file upon inclusion below.
 #
 # If the command fails, then remove Makefile.dep again and fail
-%/Makefile.dep: $(filter $D/source/$(dir $@)%, $(dim-indep-cc-files)) \
-               $(filter $D/source/$(dir $@)%, $(dim-dep-cc-files)) \
-               $(h-files) \
-               $(inst-files) \
-               ../include/deal.II/lac/lapack_templates.h \
-               Makefile $D/common/Make.global_options
+%/Makefile.dep:
        @echo "===================================== Remaking $@"
        @((($D/common/scripts/make_dependencies -n $(INCLUDE) "-B\$$(LIBDIR)" \
                        $(filter $D/source/$(dir $@)%, $(dim-indep-cc-files)) \
@@ -228,7 +238,6 @@ $(LIBDIR)/libdeal_II$(shared-lib-suffix): $(o-files)
          ) > $@) \
         || (rm -f $@ ; false)
 
-Makefile.dep: $(addsuffix /Makefile.dep, $(all-dirs))
 
 # include all the dependencies
 include $(addsuffix /Makefile.dep, $(all-dirs))
@@ -247,4 +256,4 @@ clean:
 ###################
 
 .PHONY: default all debug optimized TAGS
-.PHONY: clean Makefile.dep
+.PHONY: clean

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.