-# The PostgreSQL make files exploit features of GNU make that other
-# makes do not have. Because it is a common mistake for users to try
-# to build Postgres with a different make, we have this make file
-# that, as a service, will look for a GNU make and invoke it, or show
-# an error message if none could be found.
-
-# If the user were using GNU make now, this file would not get used
-# because GNU make uses a make file named "GNUmakefile" in preference
-# to "Makefile" if it exists. PostgreSQL is shipped with a
-# "GNUmakefile". If the user hasn't run the configure script yet, the
-# GNUmakefile won't exist yet, so we catch that case as well.
-
-
-all check install installdirs install-all-headers installcheck uninstall dep depend clean distclean maintainer-clean:
- @if [ ! -f GNUmakefile ] ; then \
- echo "You need to run the 'configure' program first. See the file"; \
- echo "'INSTALL' for installation instructions." ; \
- false ; \
- fi
- @IFS=':' ; \
- for dir in $$PATH; do \
- for prog in gmake gnumake make; do \
- if [ -f $$dir/$$prog ] && ( $$dir/$$prog -f /dev/null --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \
- GMAKE=$$dir/$$prog; \
- break 2; \
- fi; \
- done; \
- done; \
- \
- if [ x"$${GMAKE+set}" = xset ]; then \
- echo "Using GNU make found at $${GMAKE}"; \
- $${GMAKE} $@ ; \
- else \
- echo "You must use GNU make to build PostgreSQL." ; \
- false; \
- fi
+#-------------------------------------------------------------------------
+#
+# Makefile for src
+#
+# Copyright (c) 1994, Regents of the University of California
+#
+# src/Makefile
+#
+#-------------------------------------------------------------------------
+
+subdir = src
+top_builddir = ..
+include Makefile.global
+
+SUBDIRS = \
+ common \
+ port \
+ timezone \
+ backend \
+ backend/utils/mb/conversion_procs \
+ backend/snowball \
+ include \
+ interfaces \
+ backend/replication/libpqwalreceiver \
+ backend/replication/pgoutput \
+ fe_utils \
+ bin \
+ pl \
+ makefiles \
+ test/regress \
+ test/perl
+
+# There are too many interdependencies between the subdirectories, so
+# don't attempt parallel make here.
+.NOTPARALLEL:
+
+$(recurse)
+
+install: install-local
+
+install-local: installdirs-local
+ $(INSTALL_DATA) Makefile.global '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.global'
+ $(INSTALL_DATA) Makefile.port '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.port'
+ $(INSTALL_DATA) $(srcdir)/Makefile.shlib '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.shlib'
+ $(INSTALL_DATA) $(srcdir)/nls-global.mk '$(DESTDIR)$(pgxsdir)/$(subdir)/nls-global.mk'
+
+installdirs: installdirs-local
+
+installdirs-local:
+ $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
+
+uninstall: uninstall-local
+
+uninstall-local:
+ rm -f $(addprefix '$(DESTDIR)$(pgxsdir)/$(subdir)'/, Makefile.global Makefile.port Makefile.shlib nls-global.mk)
+
+distprep:
+ $(MAKE) -C test/isolation $@
+
+clean:
+ $(MAKE) -C test $@
+ $(MAKE) -C tutorial NO_PGXS=1 $@
+ $(MAKE) -C test/isolation $@
+ $(MAKE) -C test/thread $@
+
+distclean maintainer-clean:
+ $(MAKE) -C test $@
+ $(MAKE) -C tutorial NO_PGXS=1 $@
+ $(MAKE) -C test/isolation $@
+ $(MAKE) -C test/thread $@
+ rm -f Makefile.port Makefile.global
+
+coverage:
+ $(MAKE) -C timezone $@
+ $(MAKE) -C backend $@
+ $(MAKE) -C backend/utils/mb/conversion_procs $@
+ $(MAKE) -C backend/snowball $@
+ $(MAKE) -C interfaces $@
+ $(MAKE) -C backend/replication/libpqwalreceiver $@
+ $(MAKE) -C bin $@
+ $(MAKE) -C pl $@
+
+
+.PHONY: install-local installdirs-local uninstall-local