diff options
author | Peter Eisentraut | 2008-02-29 10:34:51 +0000 |
---|---|---|
committer | Peter Eisentraut | 2008-02-29 10:34:51 +0000 |
commit | 31819c68f12e2875dac21bdd60592de66ce85aae (patch) | |
tree | 48cdd8c8f9b14040de077d69723ed09cd1561836 | |
parent | 5bf8cf9787e80e346397c12d8694dfdbcb6827f1 (diff) |
Write the objfiles.txt rules in a way that is compatible with GNU make 3.78,
and simpler, too.
-rw-r--r-- | src/backend/common.mk | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/common.mk b/src/backend/common.mk index fef03728af..0e4b54764c 100644 --- a/src/backend/common.mk +++ b/src/backend/common.mk @@ -26,11 +26,9 @@ endif SUBSYS.o: $(SUBDIROBJS) $(OBJS) $(LD) $(LDREL) $(LDOUT) $@ $^ -objfiles.txt:: $(MAKEFILE_LIST) | $(SUBDIROBJS) $(OBJS) - ( $(if $(SUBDIROBJS),cat $(SUBDIROBJS); )echo $(addprefix $(subdir)/,$(OBJS)) ) >$@ - -objfiles.txt:: $(SUBDIROBJS) $(OBJS) - touch $@ +objfiles.txt: Makefile $(SUBDIROBJS) $(OBJS) +# Only rebuild the list if it does not exist or the Makefile has changed. + $(if $(filter $<,$?),( $(if $(SUBDIROBJS),cat $(SUBDIROBJS); )echo $(addprefix $(subdir)/,$(OBJS)) ) >$@,touch $@) # make function to expand objfiles.txt contents expand_subsys = $(foreach file,$(1),$(if $(filter %/objfiles.txt,$(file)),$(patsubst ../../src/backend/%,%,$(addprefix $(top_builddir)/,$(shell cat $(file)))),$(file))) |