1996-07-09 08:22:35 +02:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
2000-06-27 02:32:06 +02:00
|
|
|
# Makefile for src/bin/initdb
|
1996-07-09 08:22:35 +02:00
|
|
|
#
|
2023-01-02 21:00:37 +01:00
|
|
|
# Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
|
2001-02-18 19:34:02 +01:00
|
|
|
# Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 08:22:35 +02:00
|
|
|
#
|
2010-09-20 22:08:53 +02:00
|
|
|
# src/bin/initdb/Makefile
|
1996-07-09 08:22:35 +02:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
2004-10-05 21:30:25 +02:00
|
|
|
PGFILEDESC = "initdb - initialize a new database cluster"
|
2010-05-12 13:33:10 +02:00
|
|
|
PGAPPICON=win32
|
|
|
|
|
2000-06-27 02:32:06 +02:00
|
|
|
subdir = src/bin/initdb
|
|
|
|
top_builddir = ../../..
|
2000-08-31 18:12:35 +02:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2023-03-09 19:52:41 +01:00
|
|
|
override CPPFLAGS := -I$(libpq_srcdir) -I$(top_srcdir)/src/timezone $(ICU_CFLAGS) $(CPPFLAGS)
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2020-01-16 21:56:32 +01:00
|
|
|
# Note: it's important that we link to encnames.o from libpgcommon, not
|
|
|
|
# from libpq, else we have risks of version skew if we run with a libpq
|
|
|
|
# shared library from a different PG version. The libpq_pgport macro
|
|
|
|
# should ensure that that happens.
|
|
|
|
#
|
|
|
|
# We need libpq only because fe_utils does.
|
2023-03-09 19:52:41 +01:00
|
|
|
LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport) $(ICU_LIBS)
|
2016-08-20 21:05:25 +02:00
|
|
|
|
2011-09-13 16:58:06 +02:00
|
|
|
# use system timezone data?
|
|
|
|
ifneq (,$(with_system_tzdata))
|
|
|
|
override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"'
|
|
|
|
endif
|
|
|
|
|
2019-11-05 23:41:07 +01:00
|
|
|
OBJS = \
|
|
|
|
$(WIN32RES) \
|
|
|
|
findtimezone.o \
|
|
|
|
initdb.o \
|
|
|
|
localtime.o
|
2003-11-10 23:51:16 +01:00
|
|
|
|
2010-11-12 21:15:16 +01:00
|
|
|
all: initdb
|
2003-11-10 23:51:16 +01:00
|
|
|
|
2016-08-22 14:01:12 +02:00
|
|
|
initdb: $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
|
2022-03-20 10:21:45 +01:00
|
|
|
$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
2007-10-13 22:18:42 +02:00
|
|
|
|
2020-01-16 21:56:32 +01:00
|
|
|
# We must pull in localtime.c from src/timezones
|
2011-09-09 23:59:11 +02:00
|
|
|
localtime.c: % : $(top_srcdir)/src/timezone/%
|
|
|
|
rm -f $@ && $(LN_S) $< .
|
|
|
|
|
2000-06-27 02:32:06 +02:00
|
|
|
install: all installdirs
|
2005-12-09 22:19:36 +01:00
|
|
|
$(INSTALL_PROGRAM) initdb$(X) '$(DESTDIR)$(bindir)/initdb$(X)'
|
1996-11-11 14:41:36 +01:00
|
|
|
|
2000-06-27 02:32:06 +02:00
|
|
|
installdirs:
|
2009-08-27 00:24:44 +02:00
|
|
|
$(MKDIR_P) '$(DESTDIR)$(bindir)'
|
1996-12-10 04:40:23 +01:00
|
|
|
|
2000-06-27 02:32:06 +02:00
|
|
|
uninstall:
|
2005-12-09 22:19:36 +01:00
|
|
|
rm -f '$(DESTDIR)$(bindir)/initdb$(X)'
|
2000-06-27 02:32:06 +02:00
|
|
|
|
2003-11-23 22:42:13 +01:00
|
|
|
clean distclean maintainer-clean:
|
2020-01-16 21:56:32 +01:00
|
|
|
rm -f initdb$(X) $(OBJS) localtime.c
|
2014-04-25 21:40:35 +02:00
|
|
|
rm -rf tmp_check
|
2003-12-23 22:56:21 +01:00
|
|
|
|
2004-05-11 23:57:15 +02:00
|
|
|
# ensure that changes in datadir propagate into object file
|
2003-12-23 22:56:21 +01:00
|
|
|
initdb.o: initdb.c $(top_builddir)/src/Makefile.global
|
2014-04-15 03:33:46 +02:00
|
|
|
|
2022-03-17 11:11:21 +01:00
|
|
|
export with_icu
|
|
|
|
|
2015-04-30 02:34:22 +02:00
|
|
|
check:
|
2014-04-15 03:33:46 +02:00
|
|
|
$(prove_check)
|
|
|
|
|
|
|
|
installcheck:
|
|
|
|
$(prove_installcheck)
|