Simplify build/install process for bki and description files. There's
no reason for them to be copied into src/backend rather than being installed straight from the catalog subdirectory. This also avoids some peculiar behavior (bugs?) present in at least gmake 3.78.1: it won't always update the bki files in backend/ even when the ones in backend/catalog/ are newer.
This commit is contained in:
parent
4863829c12
commit
c61db5ba2d
|
@ -34,7 +34,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.53 2000/06/04 01:44:28 petere Exp $
|
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.54 2000/06/05 07:16:12 tgl Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -77,9 +77,7 @@ libpostgres.a: $(DLLOBJS) $(SRCDIR)/utils/dllinit.o postgres.def
|
||||||
$(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
|
$(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: prebuildheaders postgres $(POSTGRES_IMP) \
|
all: prebuildheaders postgres $(POSTGRES_IMP)
|
||||||
global1.bki.source local1_template1.bki.source \
|
|
||||||
global1.description local1_template1.description
|
|
||||||
|
|
||||||
ifneq ($(PORTNAME), win)
|
ifneq ($(PORTNAME), win)
|
||||||
|
|
||||||
|
@ -108,14 +106,6 @@ $(VERSIONOBJ): $(SRCDIR)/utils/version.c $(SRCDIR)/include/version.h
|
||||||
$(SRCDIR)/utils/dllinit.o: $(SRCDIR)/utils/dllinit.c
|
$(SRCDIR)/utils/dllinit.o: $(SRCDIR)/utils/dllinit.c
|
||||||
$(MAKE) -C $(SRCDIR)/utils dllinit.o
|
$(MAKE) -C $(SRCDIR)/utils dllinit.o
|
||||||
|
|
||||||
global1.bki.source local1_template1.bki.source \
|
|
||||||
global1.description local1_template1.description: catalog/$@
|
|
||||||
cp catalog/$@ .
|
|
||||||
|
|
||||||
catalog/global1.bki.source catalog/local1_template1.bki.source \
|
|
||||||
catalog/global1.description catalog/local1_template1.description:
|
|
||||||
$(MAKE) -C catalog $@
|
|
||||||
|
|
||||||
# The postgres.o target is needed by the rule in Makefile.global that
|
# The postgres.o target is needed by the rule in Makefile.global that
|
||||||
# creates the exports file when MAKE_EXPORTS = true.
|
# creates the exports file when MAKE_EXPORTS = true.
|
||||||
postgres.o: $(OBJS)
|
postgres.o: $(OBJS)
|
||||||
|
@ -148,9 +138,7 @@ utils/fmgroids.h: utils/Gen_fmgrtab.sh $(SRCDIR)/include/catalog/pg_proc.h
|
||||||
clean:
|
clean:
|
||||||
rm -f postgres$(X) $(POSTGRES_IMP) \
|
rm -f postgres$(X) $(POSTGRES_IMP) \
|
||||||
$(SRCDIR)/include/parser/parse.h \
|
$(SRCDIR)/include/parser/parse.h \
|
||||||
$(SRCDIR)/include/utils/fmgroids.h \
|
$(SRCDIR)/include/utils/fmgroids.h
|
||||||
global1.bki.source local1_template1.bki.source \
|
|
||||||
global1.description local1_template1.description
|
|
||||||
ifeq ($(PORTNAME), win)
|
ifeq ($(PORTNAME), win)
|
||||||
ifeq ($(MAKE_DLL), true)
|
ifeq ($(MAKE_DLL), true)
|
||||||
rm -f postgres.dll postgres.def libpostgres.a
|
rm -f postgres.dll postgres.def libpostgres.a
|
||||||
|
@ -203,18 +191,9 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install-templates: $(TEMPLATEDIR) \
|
install-templates: $(TEMPLATEDIR) \
|
||||||
global1.bki.source local1_template1.bki.source \
|
|
||||||
global1.description local1_template1.description \
|
|
||||||
libpq/pg_hba.conf.sample libpq/pg_ident.conf.sample \
|
libpq/pg_hba.conf.sample libpq/pg_ident.conf.sample \
|
||||||
utils/misc/postgresql.conf.sample
|
utils/misc/postgresql.conf.sample
|
||||||
$(INSTALL) $(INSTLOPTS) global1.bki.source \
|
$(MAKE) -C catalog install-bki-templates
|
||||||
$(TEMPLATEDIR)/global1.bki.source
|
|
||||||
$(INSTALL) $(INSTLOPTS) global1.description \
|
|
||||||
$(TEMPLATEDIR)/global1.description
|
|
||||||
$(INSTALL) $(INSTLOPTS) local1_template1.bki.source \
|
|
||||||
$(TEMPLATEDIR)/local1_template1.bki.source
|
|
||||||
$(INSTALL) $(INSTLOPTS) local1_template1.description \
|
|
||||||
$(TEMPLATEDIR)/local1_template1.description
|
|
||||||
$(INSTALL) $(INSTLOPTS) libpq/pg_hba.conf.sample \
|
$(INSTALL) $(INSTLOPTS) libpq/pg_hba.conf.sample \
|
||||||
$(TEMPLATEDIR)/pg_hba.conf.sample
|
$(TEMPLATEDIR)/pg_hba.conf.sample
|
||||||
$(INSTALL) $(INSTLOPTS) libpq/pg_ident.conf.sample \
|
$(INSTALL) $(INSTLOPTS) libpq/pg_ident.conf.sample \
|
||||||
|
|
|
@ -4,30 +4,32 @@
|
||||||
# Makefile for catalog
|
# Makefile for catalog
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.21 2000/05/29 05:44:43 tgl Exp $
|
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.22 2000/06/05 07:16:13 tgl Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
SRCDIR = ../..
|
SRCDIR = ../..
|
||||||
include ../../Makefile.global
|
include $(SRCDIR)/Makefile.global
|
||||||
|
|
||||||
OBJS = catalog.o heap.o index.o indexing.o aclchk.o \
|
OBJS = catalog.o heap.o index.o indexing.o aclchk.o \
|
||||||
pg_aggregate.o pg_operator.o pg_proc.o pg_type.o
|
pg_aggregate.o pg_operator.o pg_proc.o pg_type.o
|
||||||
|
|
||||||
all: SUBSYS.o global1.bki.source local1_template1.bki.source \
|
BKIFILES = global1.bki.source local1_template1.bki.source \
|
||||||
global1.description local1_template1.description
|
global1.description local1_template1.description
|
||||||
|
|
||||||
|
all: SUBSYS.o $(BKIFILES)
|
||||||
|
|
||||||
SUBSYS.o: $(OBJS)
|
SUBSYS.o: $(OBJS)
|
||||||
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
|
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
|
||||||
|
|
||||||
GENBKI= ./genbki.sh
|
GENBKI= ./genbki.sh
|
||||||
|
|
||||||
GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \
|
GLOBALBKI_SRCS= $(addprefix $(SRCDIR)/include/catalog/, \
|
||||||
pg_database.h pg_variable.h pg_shadow.h \
|
pg_database.h pg_variable.h pg_shadow.h \
|
||||||
pg_group.h pg_log.h \
|
pg_group.h pg_log.h \
|
||||||
)
|
)
|
||||||
|
|
||||||
LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
|
LOCALBKI_SRCS= $(addprefix $(SRCDIR)/include/catalog/, \
|
||||||
pg_proc.h pg_type.h pg_attribute.h pg_class.h \
|
pg_proc.h pg_type.h pg_attribute.h pg_class.h \
|
||||||
pg_inherits.h pg_index.h pg_statistic.h \
|
pg_inherits.h pg_index.h pg_statistic.h \
|
||||||
pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
|
pg_operator.h pg_opclass.h pg_am.h pg_amop.h pg_amproc.h \
|
||||||
|
@ -37,7 +39,7 @@ LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
|
||||||
)
|
)
|
||||||
|
|
||||||
global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS) \
|
global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS) \
|
||||||
$(addprefix ../../include/catalog/, indexing.h)
|
$(addprefix $(SRCDIR)/include/catalog/, indexing.h)
|
||||||
ifneq ($(PORTNAME), win)
|
ifneq ($(PORTNAME), win)
|
||||||
sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description
|
sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description
|
||||||
else
|
else
|
||||||
|
@ -51,14 +53,22 @@ else
|
||||||
$(GENBKI) $(BKIOPTS) $(LOCALBKI_SRCS) > $@ 2>local1_template1.description
|
$(GENBKI) $(BKIOPTS) $(LOCALBKI_SRCS) > $@ 2>local1_template1.description
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
install-bki-templates: $(BKIFILES)
|
||||||
|
$(INSTALL) $(INSTLOPTS) global1.bki.source \
|
||||||
|
$(TEMPLATEDIR)/global1.bki.source
|
||||||
|
$(INSTALL) $(INSTLOPTS) global1.description \
|
||||||
|
$(TEMPLATEDIR)/global1.description
|
||||||
|
$(INSTALL) $(INSTLOPTS) local1_template1.bki.source \
|
||||||
|
$(TEMPLATEDIR)/local1_template1.bki.source
|
||||||
|
$(INSTALL) $(INSTLOPTS) local1_template1.description \
|
||||||
|
$(TEMPLATEDIR)/local1_template1.description
|
||||||
|
|
||||||
depend dep:
|
depend dep:
|
||||||
$(CC) -MM $(CFLAGS) *.c >depend
|
$(CC) -MM $(CFLAGS) *.c >depend
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f SUBSYS.o $(OBJS) global1.bki.source local1_template1.bki.source \
|
rm -f SUBSYS.o $(OBJS) $(BKIFILES)
|
||||||
global1.description local1_template1.description
|
|
||||||
|
|
||||||
ifeq (depend,$(wildcard depend))
|
ifeq (depend,$(wildcard depend))
|
||||||
include depend
|
include depend
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue