From 3c22a320e326bc9bf522ceb50794ab1ad5d3007a Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Sat, 11 Nov 2006 13:23:11 +0000 Subject: [PATCH] minor changes to how dependencies are handled in Makefiles --- Cantera/src/Makefile.in | 19 ++++++++++++++----- Cantera/src/zeroD/Makefile.in | 5 ++++- preconfig | 6 +++--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Cantera/src/Makefile.in b/Cantera/src/Makefile.in index f005fed6b..72dc85bd5 100755 --- a/Cantera/src/Makefile.in +++ b/Cantera/src/Makefile.in @@ -180,16 +180,23 @@ ALL_H = $(BASE_H) $(THERMO_H) $(KINETICS_H) $(HETEROKIN_H) \ $(EQUIL_H) $(SOLVERS_H) $(RPATH_H) .cpp.d: - g++ -MM $(CXX_INCLUDES) $(SUNDIALS_INC) $*.cpp > $*.d + g++ -MM $(CXX_INCLUDES) $*.cpp > $*.d .cpp.o: @CXX@ -c $< $(CXX_INCLUDES) $(CXX_FLAGS) ODE_integrators.o: - @CXX@ -c ODE_integrators.cpp $(CXX_INCLUDES) $(SUNDIALS_INC) $(CXX_FLAGS) + @CXX@ -c ODE_integrators.cpp $(CXX_INCLUDES) $(SUNDIALS_INC) \ + $(CXX_FLAGS) +ODE_integrators.d: ODE_integrators.cpp Makefile + g++ -MM ODE_integrators.cpp $(CXX_INCLUDES) $(SUNDIALS_INC) \ + $(CXX_FLAGS) > ODE_integrators.d -DAE_solvers.o: - @CXX@ -c DAE_solvers.cpp $(CXX_INCLUDES) $(SUNDIALS_INC) $(CXX_FLAGS) +DAE_solvers.o: DAE_solvers.cpp + @CXX@ -c DAE_solvers.cpp $(CXX_INCLUDES) $(SUNDIALS_INC) $(CXX_FLAGS) +DAE_solvers.d: DAE_solvers.cpp Makefile + g++ -MM DAE_solvers.cpp $(CXX_INCLUDES) $(SUNDIALS_INC) \ + $(CXX_FLAGS) > DAE_solvers.d lib: $(OBJ_LIB) $(RM) $(CANTERA_LIB) @@ -231,17 +238,19 @@ depends: $(DEPENDS) cat *.d > .depends cd oneD; @MAKE@ depends ifeq (@WITH_REACTORS@, 1) - cd zeroD; @MAKE@ depends + cd zeroD; @MAKE@ .depends endif cd converters; @MAKE@ depends cd transport; @MAKE@ depends ifeq (@NEED_CATHERMO@, 1) cd thermo; @MAKE@ depends endif + $(RM) $(DEPENDS) .depends: $(DEPENDS) Makefile cat *.d > .depends + TAGS: etags *.h *.cpp diff --git a/Cantera/src/zeroD/Makefile.in b/Cantera/src/zeroD/Makefile.in index c0d7322b4..cb88d445c 100644 --- a/Cantera/src/zeroD/Makefile.in +++ b/Cantera/src/zeroD/Makefile.in @@ -29,7 +29,7 @@ ZEROD_LIB = @buildlib@/libzeroD.a DEPENDS = $(OBJS:.o=.d) -all: $(ZEROD_LIB) +all: .depends $(ZEROD_LIB) @(@INSTALL@ -d $(INCDIR)) @(for lh in $(ZEROD_H) ; do \ $(INSTALL_TSC) "$${lh}" $(INCDIR) ; \ @@ -71,6 +71,9 @@ depends: $(DEPENDS) cat *.d > .depends $(RM) $(DEPENDS) +.depends: $(DEPENDS) Makefile + cat *.d > .depends + TAGS: etags *.h *.cpp diff --git a/preconfig b/preconfig index 8765de604..fa71a3e6f 100755 --- a/preconfig +++ b/preconfig @@ -254,14 +254,14 @@ USE_SUNDIALS=${USE_SUNDIALS:='default'} # This is where you installed sundials if you used the --prefix option # when you configured sundials. If you didn't use the prefix option, # then comment this line out. -SUNDIALS_HOME=${SUNDIALS_HOME:=$HOME/sundials} +#SUNDIALS_HOME=${SUNDIALS_HOME:=$HOME/sundials} # It is recommended that you install the newest release of sundials # (currently 2.3.0) before building Cantera. But if you want to use an # older version, set SUNDIALS_VERSION to the version you have. # Acceptable values are '2.2' and '2.3' only; anything else will cause # Cantera to not use sundials. -SUNDIALS_VERSION=${SUNDIALS_VERSION:='2.2'} +SUNDIALS_VERSION=${SUNDIALS_VERSION:='2.3'} #----------------------------------------------------------------- # BLAS and LAPACK @@ -495,7 +495,7 @@ else CCPREFIX="--prefix="$CANTERA_CONFIG_PREFIX fi # -# run the configure command in the config directory +# run the configure command # ./configure $CCPREFIX $1 $2 $3 $4