diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2008-02-26 07:20:38 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2008-02-26 07:20:38 +0000 |
commit | 3690019da8b6993c4a13298851fa4bca1ef17edc (patch) | |
tree | b32529724abbe81978516f711690c0fea7d62d2b /src | |
parent | a1d5d8574751d62a039d8ceb44329ee7c637196a (diff) | |
download | postgresql-3690019da8b6993c4a13298851fa4bca1ef17edc.tar.gz postgresql-3690019da8b6993c4a13298851fa4bca1ef17edc.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/common.mk | 7 |
1 files changed, 5 insertions, 2 deletions
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)) |