From 5e45211a64149b3c659b90ff2de6fa982a5a93ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:17:33 +0200 Subject: Adding upstream version 15.5. Signed-off-by: Daniel Baumann --- src/bin/initdb/Makefile | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 src/bin/initdb/Makefile (limited to 'src/bin/initdb/Makefile') diff --git a/src/bin/initdb/Makefile b/src/bin/initdb/Makefile new file mode 100644 index 0000000..b0dd13d --- /dev/null +++ b/src/bin/initdb/Makefile @@ -0,0 +1,71 @@ +#------------------------------------------------------------------------- +# +# Makefile for src/bin/initdb +# +# Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group +# Portions Copyright (c) 1994, Regents of the University of California +# +# src/bin/initdb/Makefile +# +#------------------------------------------------------------------------- + +PGFILEDESC = "initdb - initialize a new database cluster" +PGAPPICON=win32 + +subdir = src/bin/initdb +top_builddir = ../../.. +include $(top_builddir)/src/Makefile.global + +override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) -I$(top_srcdir)/src/timezone $(CPPFLAGS) + +# 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. +LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport) + +# use system timezone data? +ifneq (,$(with_system_tzdata)) +override CPPFLAGS += '-DSYSTEMTZDIR="$(with_system_tzdata)"' +endif + +OBJS = \ + $(WIN32RES) \ + findtimezone.o \ + initdb.o \ + localtime.o + +all: initdb + +initdb: $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils + $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) + +# We must pull in localtime.c from src/timezones +localtime.c: % : $(top_srcdir)/src/timezone/% + rm -f $@ && $(LN_S) $< . + +install: all installdirs + $(INSTALL_PROGRAM) initdb$(X) '$(DESTDIR)$(bindir)/initdb$(X)' + +installdirs: + $(MKDIR_P) '$(DESTDIR)$(bindir)' + +uninstall: + rm -f '$(DESTDIR)$(bindir)/initdb$(X)' + +clean distclean maintainer-clean: + rm -f initdb$(X) $(OBJS) localtime.c + rm -rf tmp_check + +# ensure that changes in datadir propagate into object file +initdb.o: initdb.c $(top_builddir)/src/Makefile.global + +export with_icu + +check: + $(prove_check) + +installcheck: + $(prove_installcheck) -- cgit v1.2.3