diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-01-04 19:12:22 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-01-04 19:12:22 -0500 |
commit | c5c7fa261f57fadd93f166dc33ce2b1d188ad4e7 (patch) | |
tree | 17620475aa1b84a6d5f73b0185343ba799f7e43b /src | |
parent | 807ae415c54628ade937cb209f0fc9913e6b0cf5 (diff) | |
download | postgresql-c5c7fa261f57fadd93f166dc33ce2b1d188ad4e7.tar.gz postgresql-c5c7fa261f57fadd93f166dc33ce2b1d188ad4e7.zip |
Fix program build rule in src/bin/scripts/Makefile.
Commit 69ae9dcb4 added a globally-visible "%: %.o" rule, but we failed
to notice that src/bin/scripts/Makefile already had such a rule.
Apparently, the later occurrence of the same rule wins in nearly all
versions of gmake ... but not in the one used by buildfarm member jacana.
jacana is evidently using the global rule, which says to link "$<",
ie just the first dependency. But the scripts makefile needs to
link "$^", ie all the dependencies listed for the target.
There is, fortunately, no good reason not to use "$^" in the global
version of the rule, so we can just do that and get rid of the local
version.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.global.in | 2 | ||||
-rw-r--r-- | src/bin/scripts/Makefile | 19 |
2 files changed, 9 insertions, 12 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 758ea4357a7..41c131412e0 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -747,7 +747,7 @@ endif # since we put -l switches into LDFLAGS and those are order-sensitive. # In addition, include CFLAGS and LDFLAGS_EX per project conventions. %: %.o - $(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) + $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) ifndef PGXS diff --git a/src/bin/scripts/Makefile b/src/bin/scripts/Makefile index 8c9fc0c298a..9f352b5e2b2 100644 --- a/src/bin/scripts/Makefile +++ b/src/bin/scripts/Makefile @@ -23,17 +23,14 @@ LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport) all: $(PROGRAMS) -%: %.o $(WIN32RES) - $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) - -createdb: createdb.o common.o | submake-libpq submake-libpgport submake-libpgfeutils -createuser: createuser.o common.o | submake-libpq submake-libpgport submake-libpgfeutils -dropdb: dropdb.o common.o | submake-libpq submake-libpgport submake-libpgfeutils -dropuser: dropuser.o common.o | submake-libpq submake-libpgport submake-libpgfeutils -clusterdb: clusterdb.o common.o | submake-libpq submake-libpgport submake-libpgfeutils -vacuumdb: vacuumdb.o common.o | submake-libpq submake-libpgport submake-libpgfeutils -reindexdb: reindexdb.o common.o | submake-libpq submake-libpgport submake-libpgfeutils -pg_isready: pg_isready.o common.o | submake-libpq submake-libpgport submake-libpgfeutils +createdb: createdb.o common.o $(WIN32RES) | submake-libpq submake-libpgport submake-libpgfeutils +createuser: createuser.o common.o $(WIN32RES) | submake-libpq submake-libpgport submake-libpgfeutils +dropdb: dropdb.o common.o $(WIN32RES) | submake-libpq submake-libpgport submake-libpgfeutils +dropuser: dropuser.o common.o $(WIN32RES) | submake-libpq submake-libpgport submake-libpgfeutils +clusterdb: clusterdb.o common.o $(WIN32RES) | submake-libpq submake-libpgport submake-libpgfeutils +vacuumdb: vacuumdb.o common.o $(WIN32RES) | submake-libpq submake-libpgport submake-libpgfeutils +reindexdb: reindexdb.o common.o $(WIN32RES) | submake-libpq submake-libpgport submake-libpgfeutils +pg_isready: pg_isready.o common.o $(WIN32RES) | submake-libpq submake-libpgport submake-libpgfeutils install: all installdirs $(INSTALL_PROGRAM) createdb$(X) '$(DESTDIR)$(bindir)'/createdb$(X) |