From: Peter Eisentraut Date: Tue, 26 Feb 2008 07:20:38 +0000 (+0000) Subject: We don't need to rebuild objfiles.txt every time an object file changes. X-Git-Tag: REL8_4_BETA1~1953 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3690019da8b6993c4a13298851fa4bca1ef17edc;p=thirdparty%2Fpostgresql.git We don't need to rebuild objfiles.txt every time an object file changes. So only rebuild when a makefile changes (which presumably defines the file list somewhere), and only touch the file if an object changed. The touch is necessary so the parent make knows something changed and ultimately rebuilds postgres. --- diff --git a/src/backend/common.mk b/src/backend/common.mk index 9fdfa8623fc..c34d62b95d8 100644 --- a/src/backend/common.mk +++ b/src/backend/common.mk @@ -1,7 +1,7 @@ # # Common make rules for backend # -# $PostgreSQL: pgsql/src/backend/common.mk,v 1.2 2008/02/25 17:55:42 petere Exp $ +# $PostgreSQL: pgsql/src/backend/common.mk,v 1.3 2008/02/26 07:20:38 petere Exp $ # # When including this file, set OBJS to the object files created in @@ -26,9 +26,12 @@ endif SUBSYS.o: $(SUBDIROBJS) $(OBJS) $(LD) $(LDREL) $(LDOUT) $@ $^ -objfiles.txt: $(SUBDIROBJS) $(OBJS) +objfiles.txt:: $(MAKEFILE_LIST) ( $(if $(SUBDIROBJS),cat $(SUBDIROBJS); )echo $(addprefix $(subdir)/,$(OBJS)) ) >$@ +objfiles.txt:: $(SUBDIROBJS) $(OBJS) + touch $@ + # make function to expand objfiles.txt contents expand_subsys = $(foreach file,$(filter %/objfiles.txt,$(1)),$(patsubst ../../src/backend/%,%,$(addprefix $(top_builddir)/,$(shell cat $(file))))) $(filter-out %/objfiles.txt,$(1))