OSDN Git Service

Support for DESTDIR make variable. This is used as in `make install
[pg-rex/syncrep.git] / src / bin / initdb / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile for src/bin/initdb
4 #
5 # Copyright (c) 1994, Regents of the University of California
6 #
7 # $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.24 2000/09/17 13:02:31 petere Exp $
8 #
9 #-------------------------------------------------------------------------
10
11 subdir = src/bin/initdb
12 top_builddir = ../../..
13 include $(top_builddir)/src/Makefile.global
14
15 all: initdb
16
17 initdb: initdb.sh $(top_builddir)/src/Makefile.global
18         sed -e 's/@MULTIBYTE@/$(MULTIBYTE)/g' \
19             -e 's/@VERSION@/$(VERSION)/g' \
20             -e 's,@bindir@,$(bindir),g' \
21             -e 's,@datadir@,$(datadir),g' \
22           $< >$@
23         chmod a+x $@
24
25 install: all installdirs
26         $(INSTALL_SCRIPT) initdb $(DESTDIR)$(bindir)/initdb
27
28 installdirs:
29         $(mkinstalldirs) $(DESTDIR)$(bindir)
30
31 uninstall:
32         rm -f $(DESTDIR)$(bindir)/initdb
33
34 clean distclean maintainer-clean:
35         rm -f initdb