Skip to content

Commit 3690019

Browse files
committed
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.
1 parent a1d5d85 commit 3690019

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/backend/common.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# Common make rules for backend
33
#
4-
# $PostgreSQL: pgsql/src/backend/common.mk,v 1.2 2008/02/25 17:55:42 petere Exp $
4+
# $PostgreSQL: pgsql/src/backend/common.mk,v 1.3 2008/02/26 07:20:38 petere Exp $
55
#
66

77
# When including this file, set OBJS to the object files created in
@@ -26,9 +26,12 @@ endif
2626
SUBSYS.o: $(SUBDIROBJS) $(OBJS)
2727
$(LD) $(LDREL) $(LDOUT) $@ $^
2828

29-
objfiles.txt: $(SUBDIROBJS) $(OBJS)
29+
objfiles.txt:: $(MAKEFILE_LIST)
3030
( $(if $(SUBDIROBJS),cat $(SUBDIROBJS); )echo $(addprefix $(subdir)/,$(OBJS)) ) >$@
3131

32+
objfiles.txt:: $(SUBDIROBJS) $(OBJS)
33+
touch $@
34+
3235
# make function to expand objfiles.txt contents
3336
expand_subsys = $(foreach file,$(filter %/objfiles.txt,$(1)),$(patsubst ../../src/backend/%,%,$(addprefix $(top_builddir)/,$(shell cat $(file))))) $(filter-out %/objfiles.txt,$(1))
3437

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy