1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

We need to rebuild objfiles.txt when one of the subdirectories' objfiles.txt

changed in case a new file got added.
This commit is contained in:
Peter Eisentraut
2008-03-17 18:24:56 +00:00
parent f09f055d32
commit e7115a224a

View File

@ -1,7 +1,7 @@
# #
# Common make rules for backend # Common make rules for backend
# #
# $PostgreSQL: pgsql/src/backend/common.mk,v 1.6 2008/02/29 10:34:51 petere Exp $ # $PostgreSQL: pgsql/src/backend/common.mk,v 1.7 2008/03/17 18:24:56 petere Exp $
# #
# When including this file, set OBJS to the object files created in # When including this file, set OBJS to the object files created in
@ -27,8 +27,8 @@ SUBSYS.o: $(SUBDIROBJS) $(OBJS)
$(LD) $(LDREL) $(LDOUT) $@ $^ $(LD) $(LDREL) $(LDOUT) $@ $^
objfiles.txt: Makefile $(SUBDIROBJS) $(OBJS) objfiles.txt: Makefile $(SUBDIROBJS) $(OBJS)
# Only rebuild the list if it does not exist or the Makefile has changed. # Don't rebuild the list if only the OBJS have changed.
$(if $(filter $<,$?),( $(if $(SUBDIROBJS),cat $(SUBDIROBJS); )echo $(addprefix $(subdir)/,$(OBJS)) ) >$@,touch $@) $(if $(filter-out $(OBJS),$?),( $(if $(SUBDIROBJS),cat $(SUBDIROBJS); )echo $(addprefix $(subdir)/,$(OBJS)) ) >$@,touch $@)
# make function to expand objfiles.txt contents # 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))) expand_subsys = $(foreach file,$(1),$(if $(filter %/objfiles.txt,$(file)),$(patsubst ../../src/backend/%,%,$(addprefix $(top_builddir)/,$(shell cat $(file)))),$(file)))