]> https://gitweb.dealii.org/ - dealii.git/commitdiff
make clean faster and change some dependencies in master Makefile
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 13 Jul 2010 04:55:47 +0000 (04:55 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 13 Jul 2010 04:55:47 +0000 (04:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@21481 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/Makefile
deal.II/base/Makefile
deal.II/common/scripts/Makefile
deal.II/deal.II/Makefile
deal.II/doc/doxygen/Makefile.in
deal.II/doc/doxygen/tutorial/Makefile
deal.II/lac/Makefile

index 5adb84dd98cef8c927d505846f8ac95e9ebaa41b..1e83c7386e7a1479b6936ea44ddaab2bd0c62531 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Makefile for the whole library
 
-# include global options and pathes. there's one exception where we don't want
+# include global options and paths. there's one exception where we don't want
 # that, namely for build tests: in that case, the makefile is called before we
 # have even run ./configure, so we can't include this file, but the target
 # then called doesn't need the variables defined in there doesn't need them
@@ -39,14 +39,8 @@ help:
        @echo "=    distclean  : removes all object files, libraries, etc in subdirs  ="
        @echo "========================================================================"
 
-
-common/scripts/make_dependencies:
-       cd $D/common/scripts && $(MAKE) $(MAKEOPTIONS) make_dependencies
-
-common/scripts/expand_instantiations:
-       cd $D/common/scripts && $(MAKE) $(MAKEOPTIONS) expand_instantiations
-
-deps: common/scripts/make_dependencies common/scripts/expand_instantiations
+deps:
+       cd $D/common/scripts && $(MAKE) $(MAKEOPTIONS)
        cd $D/base && $(MAKE) $(MAKEOPTIONS) Makefile.dep
        cd $D/lac && $(MAKE) $(MAKEOPTIONS) Makefile.dep
        cd $D/deal.II && $(MAKE) $(MAKEOPTIONS) Makefile.dep
@@ -142,8 +136,7 @@ TAGS:
        perl -pi -e 's/ \* .*//g; s&[\t]*/\*.*&&g; s&[\t]*\*/.*&&g;' TAGS
 
 
-clean: deps \
-       clean-contrib clean-base clean-lac clean-dealII \
+clean: clean-contrib clean-base clean-lac clean-dealII \
        clean-doc clean-examples clean-lib clean-tests
        -rm -f TODO common/TAGS
 
@@ -151,22 +144,22 @@ clean-contrib:
        cd $D/contrib && $(MAKE) clean
 
 clean-base:
-       cd $D/base && $(MAKE) clean
+       cd $D/base && $(MAKE) CLEAN=yes clean
 
 clean-lac:
-       cd $D/lac && $(MAKE) clean
+       cd $D/lac && $(MAKE) CLEAN=yes clean
 
 clean-dealII:
-       cd $D/deal.II && $(MAKE) clean
+       cd $D/deal.II && $(MAKE) CLEAN=yes clean
 
 clean-doc:
-       cd $D/doc && $(MAKE) clean
+       cd $D/doc && $(MAKE) CLEAN=yes clean
 
 clean-examples:
-       cd $D/examples && $(MAKE) clean
+       cd $D/examples && $(MAKE) CLEAN=yes clean
 
 clean-lib:
-       cd $D/lib && $(MAKE) clean
+       cd $D/lib && $(MAKE) CLEAN=yes clean
 
 # if that directory exists, go into 'tests' and clean up there as well
 clean-tests:
index fc7a0f8060318eb43abae42577075d4bb3d724a5..e59816695ef336330136398930fdb3f38521e479 100644 (file)
@@ -6,6 +6,9 @@
 # deal.II top level directory
 D=..
 
+# get options which hold for all files of the project
+ifneq ($(CLEAN),yes)
+include $D/common/Make.global_options
 
 # create lists of file names
 cc-files     = $(shell echo $D/base/source/*.cc)
@@ -14,10 +17,6 @@ o-files      = $(sort $(o-files-base))
 go-files     = $(o-files:.$(OBJEXT)=.g.$(OBJEXT))
 h-files      = $(sort $(shell echo include/base/*.h))
 
-# get options which hold for all files of the project
-include $D/common/Make.global_options
-
-
 # there's an extra .o file for the function parser that we need to link into
 # libbase. do similarly for the threading building block things if threading
 # is enabled
@@ -94,12 +93,6 @@ $(LIBDIR)/libbase.g$(shared-lib-suffix): $(go-files)
        @ln -f -s $(call DEAL_II_SHLIB_NAME,base.g) $@
 
 
-
-
-clean:
-       -rm -f *~ include/*~ include/*/*~ Makefile.dep source/*.inst
-
-
 # Rule to generate the dependency file. This file is
 # automagically remade whenever needed, i.e. whenever
 # one of the cc-/h-files changed. Make detects whether
@@ -117,6 +110,11 @@ Makefile.dep: $(cc-files) $(h-files) Makefile $D/common/Make.global_options
 
 # include all the dependencies
 include Makefile.dep
+endif
+
+clean:
+       -rm -f *~ include/*~ include/*/*~ Makefile.dep source/*.inst
+
 
 .PHONY: clean
 .PHONY: lib lib$(static-lib-suffix) lib.g$(static-lib-suffix)
index c35688d82c879dd3a24630dd48ff7bb76a5733f0..bf29b23b69cdc0e5dc1eea669a06264334534c86 100644 (file)
@@ -30,9 +30,9 @@ report_features$(EXEEXT) : report_features.cc $D/common/Make.global_options
        @$(CXX) $(CXXFLAGS.o) $(LDFLAGS) $< -o $@
 
 clean:
-       -rm -f make_dependencies
+       -rm -f make_dependencies$(EXEEXT)
        -rm -f make_dependencies.o
-       -rm -f expand_instantiations
+       -rm -f expand_instantiations$(EXEEXT)
        -rm -f expand_instantiations.o
 
 .PHONY: clean
index 58ee0b3d19dc1a0255103c639d0cf2efbfb3eae0..11e920bb2684f89017b4c8fcb81495dab7e7ab3f 100644 (file)
@@ -7,10 +7,9 @@ D=..
 
 
 # get options which hold for all files of the project
+ifneq ($(CLEAN),yes)
 include $D/common/Make.global_options
 
-
-
 # top level targets
 default: 2dg 2d
 all: 2dg 2d 3dg 3d 1dg 1d
@@ -219,6 +218,7 @@ Makefile.dep: $(cc-files) $(h-files) \
 # include all the dependencies
 include Makefile.dep
 
+endif
 
 
 
index db7eedae60473c7caef535a8bec03e44537ed6b5..d20a2ebcc54cb3d2fb4df22c6ed7b46c4beeab48 100644 (file)
@@ -77,7 +77,7 @@ validate-xrefs:
 clean:
        -for i in deal.II/* ; do rm $$i ; done
        -rm *.tag
-       @cd tutorial ; $(MAKE) clean
+       @cd tutorial ; $(MAKE) CLEAN=yes clean
 
 
 .PHONY: html tutorial private deal.II \
index dd36756f03d4265d0079a98bf23ca5189e2d3b9d..a8421caf03e9161dbc5ee5d57783d21b9c5d0c97 100644 (file)
@@ -196,4 +196,6 @@ Makefile.dep: $(shell echo $D/examples/*/*.cc $D/examples/*/doc/*.dox) Makefile
         done \
        > $@
 
+ifneq ($(CLEAN),yes)
 include Makefile.dep
+endif
index ce56af9971243b2c1a9bc6513258e5cf2792fc93..e7b503ef4d9fd9ec093ceef119810fabb3485940 100644 (file)
@@ -6,9 +6,9 @@
 D=..
 
 # get options which hold for all files of the project
+ifneq ($(CLEAN),yes)
 include $D/common/Make.global_options
 
-
 # create lists of file names
 cc-files     = $(shell echo $D/lac/source/*.cc)
 o-files-base = $(sort $(addprefix $(LIBDIR)/lac/, $(patsubst $D/lac/source/%,%,$(cc-files:.cc=.$(OBJEXT)))))
@@ -130,11 +130,6 @@ include/lac/lapack_templates.h: include/lac/lapack_templates.h.in $D/common/scri
        @echo ===================================== Remaking $@
        @$(PERL) $D/common/scripts/lapack_templates.pl include/lac/lapack_templates.h.in > $@
 
-
-clean:
-       -rm -f *~ include/*~ include/*/*~ Makefile.dep source/*.inst
-
-
 # Rule to generate the dependency file. This file is
 # automagically remade whenever needed, i.e. whenever
 # one of the cc-/h-files changed. Make detects whether
@@ -153,6 +148,12 @@ Makefile.dep: include/lac/lapack_templates.h \
 
 # include all the dependencies
 include Makefile.dep
+endif # CLEAN
+
+
+clean:
+       -rm -f *~ include/*~ include/*/*~ Makefile.dep source/*.inst
+
 
 .PHONY: clean
 .PHONY: lib lib$(static-lib-suffix) lib.g$(static-lib-suffix)

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.