]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
dependency generation
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 Jan 2000 20:45:54 +0000 (20:45 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 Jan 2000 20:45:54 +0000 (20:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@2225 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/Make.rules

index 7f1f3cdf54b9c5c3a610a3b3812f27ba7b8a3def..f4e5285c1e3f6ad5393754b5d2147318710a4754 100644 (file)
@@ -17,3 +17,16 @@ include $D/common/Make.global_options
 %.o : %.cc Makefile
        @echo =====optimized===== $<
        @$(CXX) $(flags) -c $< -o $@
+
+############################################################
+# Automatic generation of dependencies
+############################################################
+
+all-cc-files = $(shell echo *.cc)
+
+Makefile.depend: $(all-cc-files)
+       @echo =====Dependencies== Make.depend
+       @$(CXX) $(flags) $^ -M > $@
+       @perl -pi~ -e 's/(^[^.]+)\.o:/\1.o \1.g.o:/;' $@
+
+include Makefile.depend

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.