From: wolf Date: Wed, 24 Feb 1999 13:19:10 +0000 (+0000) Subject: Improve the handling of the automatically generated forward declaration files. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b07a116312e26c9c76d2915487c443fc1a46ec3c;p=dealii-svn.git Improve the handling of the automatically generated forward declaration files. git-svn-id: https://svn.dealii.org/trunk@892 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/Makefile b/deal.II/base/Makefile index e355293af9..dbe68b2171 100644 --- a/deal.II/base/Makefile +++ b/deal.II/base/Makefile @@ -4,7 +4,7 @@ all: lac clean: source-clean - rm -f *~ include/*~ include/*/*~ lib/lib* + rm -f *~ include/*~ include/*/*~ lib/lib* include/base/forward-declarations.h* lac: cd source ; make diff --git a/deal.II/base/source/Makefile b/deal.II/base/source/Makefile index 776d7ea425..5782598795 100644 --- a/deal.II/base/source/Makefile +++ b/deal.II/base/source/Makefile @@ -2,13 +2,17 @@ D=../.. -include $D/deal.II/Make.global_options - cc-files = $(wildcard *.cc) o-files = $(cc-files:.cc=.o) go-files = $(cc-files:.cc=.go) h-files = $(wildcard ../include/*/*.h) +forward-declarations = ../include/base/forward-declarations.h + +include $D/deal.II/Make.global_options +include $D/deal.II/Make.forward-declarations + + %.go : %.cc Makefile @echo ======== DEBUG =================== $< @@ -28,10 +32,6 @@ lib.g.a: ../lib/libbase.g.a($(go-files)) clean: rm -f *.o *.go *~ Makefile.dep ../lib/lib* -# rule how to make the file containing all the forward declarations -../include/base/forward-declarations.h: $(filter-out %forward-declarations.h,$(h-files)) - @echo ============================ Generating $@ - @perl ../../deal.II/Make_forward_declarations $(filter-out %forward-declarations.h,$(h-files)) > $@ .PHONY: lib lib.a lib.g.a clean @@ -46,7 +46,7 @@ clean: #use perl to generate rules for the .go files as well #as to make rules not for tria.o and the like, but #rather for libbasic.a(tria.o) -../lib/Makefile.dep: $(cc-files) $(h-files) +../lib/Makefile.dep: $(cc-files) $(filter-out $(forward-declarations),$(h-files)) Makefile @echo ============================ Remaking Makefile @perl ../Make_dep.pl ../lib/libbase $(INCLUDE) $(cc-files) \ > ../lib/Makefile.dep diff --git a/deal.II/deal.II/source/Makefile b/deal.II/deal.II/source/Makefile index 607304eb6f..5e2efb66fb 100644 --- a/deal.II/deal.II/source/Makefile +++ b/deal.II/deal.II/source/Makefile @@ -12,13 +12,17 @@ D=../.. -include $D/deal.II/Make.global_options - cc-files = $(wildcard */*.cc) h-files = $(wildcard ../include/*/*.h) forward-declarations = ../include/basic/forward-declarations.h +include $D/deal.II/Make.global_options +include $D/deal.II/Make.forward-declarations + + + + # strip subdirectories from cc file names, preprend a "../lib/[g]o" # and change the suffix. We place the object files with or without # debug info in different directories, since we want to use the diff --git a/deal.II/lac/Makefile b/deal.II/lac/Makefile index 7c0e62d179..693641b35e 100644 --- a/deal.II/lac/Makefile +++ b/deal.II/lac/Makefile @@ -4,7 +4,7 @@ all: lac clean: source-clean - rm -f *~ include/*~ include/*/*~ lib/lib* lib/Makefile.dep + rm -f *~ include/*~ include/*/*~ lib/lib* lib/Makefile.dep include/lac/forward-declarations.h* lac: cd source ; make diff --git a/deal.II/lac/source/Makefile b/deal.II/lac/source/Makefile index af99cdae77..d748ec1e00 100644 --- a/deal.II/lac/source/Makefile +++ b/deal.II/lac/source/Makefile @@ -14,6 +14,11 @@ o-files = $(cc-files:.cc=.o) go-files = $(cc-files:.cc=.go) h-files = $(wildcard ../include/*/*.h) +forward-declarations = ../include/lac/forward-declarations.h + +D=../.. +include $D/deal.II/Make.forward-declarations + %.go : %.cc Makefile @echo ============================ Compiling with debugging information: $< @@ -34,11 +39,6 @@ clean: rm -f *.o *.go *~ Makefile.dep ../lib/lib* -# rule how to make the file containing all the forward declarations -../include/lac/forward-declarations.h: $(filter-out %forward-declarations.h,$(h-files)) - @echo ============================ Generating $@ - @perl ../../deal.II/Make_forward_declarations $(filter-out %forward-declarations.h,$(h-files)) > $@ - @@ -54,7 +54,7 @@ clean: #use perl to generate rules for the .go files as well #as to make rules not for tria.o and the like, but #rather for libbasic.a(tria.o) -../lib/Makefile.dep: $(cc-files) $(h-files) +../lib/Makefile.dep: $(cc-files) $(filter-out $(forward-declarations),$(h-files)) Makefile @echo ============================ Remaking Makefile @perl ../Make_dep.pl ../lib/liblac $(INCLUDE) $(cc-files) \ > ../lib/Makefile.dep