]> granicus.if.org Git - postgresql/blobdiff - src/Makefile
Fix pg_server_to_client, that was broken in the previous commit.
[postgresql] / src / Makefile
index 8fbbcbdac2a6cc06d45734b6a77df213ae757ac9..4469d2cdf2c004e178d9b9d3c268e913224c4a93 100644 (file)
@@ -1,16 +1,75 @@
-# The Postgres 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 does nothing
-# but tell the user to use GNU make.
-
-# 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.  Postgres is shipped with a "GNUmakefile".
-
-all install clean dep depend distclean:
-       @echo "You must use GNU make to use Postgres.  It may be installed"
-       @echo "on your system with the name 'gmake'."
-       @echo
-       @echo "NOTE:  If you are sure that you are using GNU make and you are"
-       @echo "       still getting this message, you may simply need to run"
-       @echo "       the configure program."
+#-------------------------------------------------------------------------
+#
+# Makefile for src
+#
+# Copyright (c) 1994, Regents of the University of California
+#
+# src/Makefile
+#
+#-------------------------------------------------------------------------
+
+subdir = src
+top_builddir = ..
+include Makefile.global
+
+SUBDIRS = \
+       port \
+       timezone \
+       backend \
+       backend/utils/mb/conversion_procs \
+       backend/snowball \
+       include \
+       interfaces \
+       backend/replication/libpqwalreceiver \
+       bin \
+       pl \
+       makefiles \
+       test/regress
+
+# 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)
+
+clean:
+       $(MAKE) -C test $@
+       $(MAKE) -C tutorial NO_PGXS=1 $@
+       $(MAKE) -C test/thread $@
+
+distclean maintainer-clean:
+       $(MAKE) -C test $@
+       $(MAKE) -C tutorial NO_PGXS=1 $@
+       $(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