From f4638971f3bd1a041a96883b1552c732e60890d3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 5 Nov 2010 06:53:25 +0000 Subject: [PATCH] Ensure that we only rebuild those parts of the Makefile that are really necessary. This didnt git-svn-id: https://svn.dealii.org/trunk@22609 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/Makefile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/deal.II/source/Makefile b/deal.II/source/Makefile index 8a9ed2b1c5..5a0b18036d 100644 --- a/deal.II/source/Makefile +++ b/deal.II/source/Makefile @@ -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 -- 2.39.5