]> granicus.if.org Git - postgresql/blob - src/Makefile
Replace our traditional initial-catalog-data format with a better design.
[postgresql] / src / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile for src
4 #
5 # Copyright (c) 1994, Regents of the University of California
6 #
7 # src/Makefile
8 #
9 #-------------------------------------------------------------------------
10
11 subdir = src
12 top_builddir = ..
13 include Makefile.global
14
15 SUBDIRS = \
16         common \
17         port \
18         timezone \
19         backend \
20         backend/utils/mb/conversion_procs \
21         backend/snowball \
22         include \
23         interfaces \
24         backend/replication/libpqwalreceiver \
25         backend/replication/pgoutput \
26         fe_utils \
27         bin \
28         pl \
29         makefiles \
30         test/regress \
31         test/isolation \
32         test/perl
33
34 ifeq ($(with_llvm), yes)
35 SUBDIRS += backend/jit/llvm
36 endif
37
38 # There are too many interdependencies between the subdirectories, so
39 # don't attempt parallel make here.
40 .NOTPARALLEL:
41
42 $(recurse)
43
44 # Update the commonly used headers before building the subdirectories;
45 # otherwise, in a parallel build, several different sub-jobs will try to
46 # remake them concurrently
47 $(SUBDIRS:%=all-%-recurse): | submake-generated-headers
48
49 install: install-local
50
51 install-local: installdirs-local
52         $(INSTALL_DATA) Makefile.global '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.global'
53         $(INSTALL_DATA) Makefile.port '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.port'
54         $(INSTALL_DATA) $(srcdir)/Makefile.shlib '$(DESTDIR)$(pgxsdir)/$(subdir)/Makefile.shlib'
55         $(INSTALL_DATA) $(srcdir)/nls-global.mk '$(DESTDIR)$(pgxsdir)/$(subdir)/nls-global.mk'
56
57 installdirs: installdirs-local
58
59 installdirs-local:
60         $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
61
62 uninstall: uninstall-local
63
64 uninstall-local:
65         rm -f $(addprefix '$(DESTDIR)$(pgxsdir)/$(subdir)'/, Makefile.global Makefile.port Makefile.shlib nls-global.mk)
66
67 distprep:
68         $(MAKE) -C test/isolation $@
69
70 clean:
71         $(MAKE) -C test $@
72         $(MAKE) -C tutorial NO_PGXS=1 $@
73         $(MAKE) -C test/isolation $@
74         $(MAKE) -C test/thread $@
75
76 distclean maintainer-clean:
77         $(MAKE) -C test $@
78         $(MAKE) -C tutorial NO_PGXS=1 $@
79         $(MAKE) -C test/isolation $@
80         $(MAKE) -C test/thread $@
81         rm -f Makefile.port Makefile.global
82
83
84 .PHONY: install-local installdirs-local uninstall-local