We need to rebuild objfiles.txt when one of the subdirectories' objfiles.txt
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 17 Mar 2008 18:24:56 +0000 (18:24 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 17 Mar 2008 18:24:56 +0000 (18:24 +0000)
changed in case a new file got added.

src/backend/common.mk

index 0e4b54764ce4d9e0fbcf7815245d7d2d09319bb8..cf7ff0c583ae9d17b45a80b2ccf7080d1bfd12f4 100644 (file)
@@ -27,8 +27,8 @@ SUBSYS.o: $(SUBDIROBJS) $(OBJS)
        $(LD) $(LDREL) $(LDOUT) $@ $^
 
 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 $@)
+# Don't rebuild the list if only the OBJS have changed.
+       $(if $(filter-out $(OBJS),$?),( $(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)))