1 # src/bin/pg_upgrade/Makefile
3 PGFILEDESC
= "pg_upgrade - an in-place binary upgrade utility"
6 subdir
= src
/bin
/pg_upgrade
7 top_builddir
= ..
/..
/..
8 include $(top_builddir
)/src
/Makefile.global
28 override CPPFLAGS
:= -DDLSUFFIX
=\"$(DLSUFFIX
)\" -I
$(srcdir) -I
$(libpq_srcdir
) $(CPPFLAGS
)
29 LDFLAGS_INTERNAL
+= -L
$(top_builddir
)/src
/fe_utils
-lpgfeutils
$(libpq_pgport
)
33 pg_upgrade
: $(OBJS
) | submake-libpq submake-libpgport submake-libpgfeutils
34 $(CC
) $(CFLAGS
) $^
$(LDFLAGS
) $(LDFLAGS_EX
) $(LIBS
) -o
$@
$(X
)
36 install: all installdirs
37 $(INSTALL_PROGRAM
) pg_upgrade
$(X
) '$(DESTDIR)$(bindir)/pg_upgrade$(X)'
40 $(MKDIR_P
) '$(DESTDIR)$(bindir)'
43 rm -f
'$(DESTDIR)$(bindir)/pg_upgrade$(X)'
45 clean distclean maintainer-clean
:
46 rm -f pg_upgrade
$(X
) $(OBJS
)
47 rm -rf delete_old_cluster.sh log
/ tmp_check
/ \
48 loadable_libraries.txt reindex_hash.sql \
49 pg_upgrade_dump_globals.sql \
50 pg_upgrade_dump_
*.custom pg_upgrade_
*.log
52 # When $(MAKE) is present, make automatically infers that this is a
53 # recursive make. which is not actually what we want here, as that
54 # e.g. prevents output synchronization from working (as make thinks
55 # that the subsidiary make knows how to deal with that itself, but
56 # we're invoking a shell script that doesn't know). Referencing
57 # $(MAKE) indirectly avoids that behaviour.
58 # See https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html#MAKE-Variable
59 NOTSUBMAKEMAKE
=$(MAKE
)
61 check: test.sh
all temp-install
62 MAKE
=$(NOTSUBMAKEMAKE
) $(with_temp_install
) bindir=$(abs_top_builddir
)/tmp_install
/$(bindir) EXTRA_REGRESS_OPTS
="$(EXTRA_REGRESS_OPTS)" $(SHELL
) $<
64 # installcheck is not supported because there's no meaningful way to test
65 # pg_upgrade against a single already-running server