diff options
author | Peter Eisentraut | 2008-02-26 07:20:38 +0000 |
---|---|---|
committer | Peter Eisentraut | 2008-02-26 07:20:38 +0000 |
commit | 203c7f9e3192525a951ad3aa2361630295d28bb7 (patch) | |
tree | 430fe701de964179f0985fda2f9a4bad9a52b378 | |
parent | 094593ee5564bdbb16f84b50fe359e928bc91dd9 (diff) |
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.
-rw-r--r-- | src/backend/common.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/common.mk b/src/backend/common.mk index 46c75bd17a..1c4537e1a8 100644 --- a/src/backend/common.mk +++ b/src/backend/common.mk @@ -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)) |