mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-30 19:00:29 +08:00
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.
This commit is contained in:
parent
a1d5d85747
commit
3690019da8
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user