Consistently use "superuser" instead of "super user"
[pgsql.git] / src / bin / initdb / Makefile
bloba620a5bea061bd17b4f30b5f4a1e5613d0c32640
1 #-------------------------------------------------------------------------
3 # Makefile for src/bin/initdb
5 # Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
6 # Portions Copyright (c) 1994, Regents of the University of California
8 # src/bin/initdb/Makefile
10 #-------------------------------------------------------------------------
12 PGFILEDESC = "initdb - initialize a new database cluster"
13 PGAPPICON=win32
15 subdir = src/bin/initdb
16 top_builddir = ../../..
17 include $(top_builddir)/src/Makefile.global
19 override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) -I$(top_srcdir)/src/timezone $(CPPFLAGS)
21 # Note: it's important that we link to encnames.o from libpgcommon, not
22 # from libpq, else we have risks of version skew if we run with a libpq
23 # shared library from a different PG version. The libpq_pgport macro
24 # should ensure that that happens.
26 # We need libpq only because fe_utils does.
27 LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport)
29 # use system timezone data?
30 ifneq (,$(with_system_tzdata))
31 override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"'
32 endif
34 OBJS = \
35 $(WIN32RES) \
36 findtimezone.o \
37 initdb.o \
38 localtime.o
40 all: initdb
42 initdb: $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
43 $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
45 # We must pull in localtime.c from src/timezones
46 localtime.c: % : $(top_srcdir)/src/timezone/%
47 rm -f $@ && $(LN_S) $< .
49 install: all installdirs
50 $(INSTALL_PROGRAM) initdb$(X) '$(DESTDIR)$(bindir)/initdb$(X)'
52 installdirs:
53 $(MKDIR_P) '$(DESTDIR)$(bindir)'
55 uninstall:
56 rm -f '$(DESTDIR)$(bindir)/initdb$(X)'
58 clean distclean maintainer-clean:
59 rm -f initdb$(X) $(OBJS) localtime.c
60 rm -rf tmp_check
62 # ensure that changes in datadir propagate into object file
63 initdb.o: initdb.c $(top_builddir)/src/Makefile.global
65 check:
66 $(prove_check)
68 installcheck:
69 $(prove_installcheck)