]> granicus.if.org Git - postgresql/blobdiff - src/Makefile
Fix pg_server_to_client, that was broken in the previous commit.
[postgresql] / src / Makefile
index 28f6edf70b1fcb6a75853a942af11300ee95b5e2..4469d2cdf2c004e178d9b9d3c268e913224c4a93 100644 (file)
@@ -1,62 +1,75 @@
 #-------------------------------------------------------------------------
 #
-# Makefile.inc--
-#    Build and install postgres.
+# Makefile for src
 #
 # Copyright (c) 1994, Regents of the University of California
 #
-# IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/Makefile,v 1.13 1996/12/10 03:03:36 scrappy Exp $
+# src/Makefile
 #
 #-------------------------------------------------------------------------
 
-SRCDIR= .
+subdir = src
+top_builddir = ..
 include Makefile.global
 
-FIND = find
-# assuming gnu tar and split here
-TAR  = tar
-SPLIT = split
-
-ETAGS = etags
-XARGS = xargs
-
-.DEFAULT all:
-       @if test $(PORTNAME) = UNDEFINED; then \
-         echo You must set the PORTNAME value in Makefile.global before \
-              you can build Postgres. ;\
-         false ;\
-       fi
-       $(MAKE) -C utils $@
+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 libpq $@
-ifeq ($(HAVE_Cplusplus), true)
-       $(MAKE) -C libpq++ $@
-endif
-ifeq ($(USE_TCL), true)
-       $(MAKE) -C libpgtcl $@
-endif
+       $(MAKE) -C backend/utils/mb/conversion_procs $@
+       $(MAKE) -C backend/snowball $@
+       $(MAKE) -C interfaces $@
+       $(MAKE) -C backend/replication/libpqwalreceiver $@
        $(MAKE) -C bin $@
-ifneq ($(wildcard man), )
-       $(MAKE) -C man $@
-endif
-       @if test $@. = all. -o $@. = .; then \
-       echo All of Postgres95 is successfully made.  Ready to install. ;\
-        fi
-
-TAGS:
-       rm -f TAGS; \
-       for i in backend libpq bin; do \
-         $(FIND) $$i -name '*.[chyl]' -print | $(XARGS) $(ETAGS) -a ; \
-       done
-
-# target to generate a backup tar file and split files that can be 
-# saved to 1.44M floppy
-BACKUP:
-       rm -f BACKUP.filelist BACKUP.tgz; \
-       $(FIND) . -not -path '*obj/*' -not -path '*data/*' -type f -print > BACKUP.filelist; \
-       $(TAR) --files-from BACKUP.filelist -c -z -v -f BACKUP.tgz
-       $(SPLIT) --bytes=1400k BACKUP.tgz pgBACKUP.     
-
-.PHONY: TAGS
-.PHONY: BACKUP
+       $(MAKE) -C pl $@
+
+
+.PHONY: install-local installdirs-local uninstall-local