From 229b097a2b821fb751650e07005ecb1e6b7dea7f Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 17 Jan 2007 14:41:17 +0000 Subject: [PATCH] Fix Makefile to preserve module file dates while copying, avoiding compilation cascades when possible. --- base/Makefile | 4 ++-- base/modules/Makefile | 2 +- baseprec/Makefile | 4 ++-- krylov/Makefile | 4 ++-- util/Makefile | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/base/Makefile b/base/Makefile index 6c36db68..3ca78814 100644 --- a/base/Makefile +++ b/base/Makefile @@ -11,8 +11,8 @@ lib: (cd tools; make lib LIBNAME=$(BASELIBNAME)) (cd serial; make lib LIBNAME=$(BASELIBNAME)) (cd psblas; make lib LIBNAME=$(BASELIBNAME)) - /bin/cp $(HERE)/$(LIBNAME) $(LIBDIR) - /bin/cp $(LIBMOD) $(LIBDIR) + /bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR) + /bin/cp -p $(LIBMOD) $(LIBDIR) clean: (cd modules; make clean) diff --git a/base/modules/Makefile b/base/modules/Makefile index 991a7af6..663cf28a 100644 --- a/base/modules/Makefile +++ b/base/modules/Makefile @@ -33,7 +33,7 @@ psb_base_mod.o: $(MODULES) $(MPFOBJS) lib: mpfobjs $(MODULES) $(OBJS) $(AR) $(LIBDIR)/$(LIBNAME) $(MODULES) $(OBJS) $(MPFOBJS) $(RANLIB) $(LIBDIR)/$(LIBNAME) - /bin/cp $(LIBMOD) ./parts.fh $(LIBDIR) + /bin/cp -p $(LIBMOD) ./parts.fh $(LIBDIR) mpfobjs: diff --git a/baseprec/Makefile b/baseprec/Makefile index 61093e61..1d545097 100644 --- a/baseprec/Makefile +++ b/baseprec/Makefile @@ -25,8 +25,8 @@ OBJS=$(F90OBJS) $(COBJS) $(MPFOBJS) $(MODOBJS) lib: $(OBJS) $(AR) $(HERE)/$(LIBNAME) $(OBJS) $(RANLIB) $(HERE)/$(LIBNAME) - /bin/cp $(HERE)/$(LIBNAME) $(LIBDIR) - /bin/cp $(LIBMOD) $(LIBDIR) + /bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR) + /bin/cp -p $(LIBMOD) $(LIBDIR) $(F90OBJS): $(MODOBJS) psb_prec_mod.o: psb_prec_type.o diff --git a/krylov/Makefile b/krylov/Makefile index 99c2e36f..c77ae8c3 100644 --- a/krylov/Makefile +++ b/krylov/Makefile @@ -18,8 +18,8 @@ INCDIRS=-I. -I$(LIBDIR) lib: $(OBJS) $(AR) $(HERE)/$(LIBNAME) $(OBJS) $(RANLIB) $(HERE)/$(LIBNAME) - /bin/cp $(HERE)/$(LIBNAME) $(LIBDIR) - /bin/cp $(LIBMOD) $(LIBDIR) + /bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR) + /bin/cp -p $(LIBMOD) $(LIBDIR) veryclean: clean /bin/rm -f $(HERE)/$(LIBNAME) diff --git a/util/Makefile b/util/Makefile index 3c216b3a..eaab2bed 100644 --- a/util/Makefile +++ b/util/Makefile @@ -18,8 +18,8 @@ INCDIRS=-I. -I$(LIBDIR) lib: $(OBJS) $(AR) $(HERE)/$(LIBNAME) $(OBJS) $(RANLIB) $(HERE)/$(LIBNAME) - /bin/cp $(HERE)/$(LIBNAME) $(LIBDIR) - /bin/cp $(LIBMOD) $(LIBDIR) + /bin/cp -p $(HERE)/$(LIBNAME) $(LIBDIR) + /bin/cp -p $(LIBMOD) $(LIBDIR) psb_util_mod.o: $(BASEOBJ)