Skip to content

Commit 02504df

Browse files
committed
Write the objfiles.txt rules in a way that is compatible with GNU make 3.78,
and simpler, too.
1 parent ff428cd commit 02504df

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/backend/common.mk

Lines changed: 4 additions & 6 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.5 2008/02/27 20:31:01 petere Exp $
4+
# $PostgreSQL: pgsql/src/backend/common.mk,v 1.6 2008/02/29 10:34:51 petere Exp $
55
#
66

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

29-
objfiles.txt:: $(MAKEFILE_LIST) | $(SUBDIROBJS) $(OBJS)
30-
( $(if $(SUBDIROBJS),cat $(SUBDIROBJS); )echo $(addprefix $(subdir)/,$(OBJS)) ) >$@
31-
32-
objfiles.txt:: $(SUBDIROBJS) $(OBJS)
33-
touch $@
29+
objfiles.txt: Makefile $(SUBDIROBJS) $(OBJS)
30+
# Only rebuild the list if it does not exist or the Makefile has changed.
31+
$(if $(filter $<,$?),( $(if $(SUBDIROBJS),cat $(SUBDIROBJS); )echo $(addprefix $(subdir)/,$(OBJS)) ) >$@,touch $@)
3432

3533
# make function to expand objfiles.txt contents
3634
expand_subsys = $(foreach file,$(1),$(if $(filter %/objfiles.txt,$(file)),$(patsubst ../../src/backend/%,%,$(addprefix $(top_builddir)/,$(shell cat $(file)))),$(file)))

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