mirror of https://github.com/postgres/postgres
functional. Handle include file installation in src/include/Makefile genbki.sh improvements: Don't substitute anything by config.status, instead pass in AWK and CPP through environment. Change calling convention to support named output files, so we get to see error messages on stderr. Rename bootstrap template files and install them into PREFIX/share. Update initdb to that effect and other readability improvements in initdb.REL7_1_STABLE
parent
b027ad9a7a
commit
f0b4ae697f
@ -1,90 +1,41 @@ |
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile.inc--
|
||||
# Build and install postgres.
|
||||
# Makefile for src
|
||||
#
|
||||
# Copyright (c) 1994, Regents of the University of California
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.56 2000/07/02 15:20:41 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.57 2000/07/06 21:33:12 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
SRCDIR= .
|
||||
subdir = src
|
||||
top_builddir = ..
|
||||
include Makefile.global |
||||
|
||||
FIND = @find@
|
||||
|
||||
# assuming gnu tar and split here
|
||||
TAR = @tar@
|
||||
SPLIT = @split@
|
||||
|
||||
ETAGS = @etags@
|
||||
XARGS = @xargs@
|
||||
|
||||
all: |
||||
$(MAKE) -C backend all
|
||||
$(MAKE) -C interfaces all
|
||||
$(MAKE) -C bin all
|
||||
$(MAKE) -C pl all
|
||||
|
||||
install: installdirs |
||||
$(MAKE) -C backend install
|
||||
$(MAKE) -C interfaces install
|
||||
$(MAKE) -C bin install
|
||||
$(MAKE) -C pl install
|
||||
|
||||
installdirs: |
||||
../config/mkinstalldirs $(BINDIR) $(LIBDIR) $(INCLUDEDIR)
|
||||
all install installdirs uninstall dep depend: |
||||
$(MAKE) -C backend $@
|
||||
$(MAKE) -C include $@
|
||||
$(MAKE) -C interfaces $@
|
||||
$(MAKE) -C bin $@
|
||||
$(MAKE) -C pl $@
|
||||
|
||||
clean: |
||||
$(MAKE) -C utils clean
|
||||
$(MAKE) -C backend clean
|
||||
$(MAKE) -C interfaces clean
|
||||
$(MAKE) -C bin clean
|
||||
$(MAKE) -C pl clean
|
||||
$(MAKE) -C backend $@
|
||||
$(MAKE) -C include $@
|
||||
$(MAKE) -C interfaces $@
|
||||
$(MAKE) -C bin $@
|
||||
$(MAKE) -C pl $@
|
||||
$(MAKE) -C utils $@
|
||||
$(MAKE) -C test clean
|
||||
$(MAKE) -C ../contrib/spi clean
|
||||
|
||||
# Not all subdirectories have a make distclean target yet
|
||||
distclean maintainer-clean: |
||||
-$(MAKE) -C utils clean
|
||||
-$(MAKE) -C backend clean
|
||||
rm -f backend/port/Makefile backend/catalog/genbki.sh \
|
||||
backend/port/tas.s backend/port/dynloader.c
|
||||
-$(MAKE) -C utils $@
|
||||
-$(MAKE) -C backend $@
|
||||
-$(MAKE) -C include $@
|
||||
-$(MAKE) -C interfaces $@
|
||||
-$(MAKE) -C bin $@
|
||||
-$(MAKE) -C pl $@
|
||||
-$(MAKE) -C test clean
|
||||
rm -f test/regress/GNUmakefile
|
||||
-$(MAKE) -C ../contrib/spi clean
|
||||
rm -f Makefile.port \
|
||||
include/config.h include/dynloader.h \
|
||||
include/os.h include/version.h \
|
||||
Makefile.global \
|
||||
GNUmakefile
|
||||
|
||||
.DEFAULT: |
||||
$(MAKE) -C utils $@
|
||||
$(MAKE) -C backend $@
|
||||
$(MAKE) -C interfaces $@
|
||||
$(MAKE) -C bin $@
|
||||
$(MAKE) -C pl $@
|
||||
|
||||
TAGS: |
||||
rm -f TAGS; \
|
||||
for i in backend interfaces/libpq bin; do \
|
||||
$(FIND) $$i -name '*.[chyl]' -print | $(XARGS) $(ETAGS) -a ; \
|
||||
done
|
||||
|
||||
# target to generate a backup tar file and split files that can be
|
||||
# saved to 1.44M floppy
|
||||
BACKUP: |
||||
rm -f BACKUP.filelist BACKUP.tgz; \
|
||||
$(FIND) . -not -path '*obj/*' -not -path '*data/*' -type f -print > BACKUP.filelist; \
|
||||
$(TAR) --files-from BACKUP.filelist -c -z -v -f BACKUP.tgz
|
||||
$(SPLIT) --bytes=1400k BACKUP.tgz pgBACKUP.
|
||||
|
||||
.PHONY: TAGS |
||||
.PHONY: BACKUP |
||||
rm -f Makefile.port Makefile.global GNUmakefile
|
||||
|
@ -1,74 +1,68 @@ |
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile--
|
||||
# Makefile for catalog
|
||||
# Makefile for catalog
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.22 2000/06/05 07:16:13 tgl Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.23 2000/07/06 21:33:22 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
SRCDIR = ../..
|
||||
include $(SRCDIR)/Makefile.global |
||||
subdir = src/backend/catalog
|
||||
top_builddir = ../../..
|
||||
include ../../Makefile.global |
||||
|
||||
OBJS = catalog.o heap.o index.o indexing.o aclchk.o \
|
||||
pg_aggregate.o pg_operator.o pg_proc.o pg_type.o
|
||||
|
||||
BKIFILES = global1.bki.source local1_template1.bki.source \
|
||||
global1.description local1_template1.description
|
||||
BKIFILES = global.bki template1.bki global.description template1.description
|
||||
|
||||
all: SUBSYS.o $(BKIFILES) |
||||
|
||||
SUBSYS.o: $(OBJS) |
||||
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
|
||||
|
||||
GENBKI= ./genbki.sh
|
||||
|
||||
GLOBALBKI_SRCS= $(addprefix $(SRCDIR)/include/catalog/, \
|
||||
pg_database.h pg_variable.h pg_shadow.h \
|
||||
pg_group.h pg_log.h \
|
||||
)
|
||||
|
||||
LOCALBKI_SRCS= $(addprefix $(SRCDIR)/include/catalog/, \
|
||||
pg_proc.h pg_type.h pg_attribute.h pg_class.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_language.h \
|
||||
pg_aggregate.h pg_ipl.h pg_inheritproc.h \
|
||||
pg_rewrite.h pg_listener.h pg_description.h indexing.h \
|
||||
)
|
||||
|
||||
global1.bki.source: $(GENBKI) $(GLOBALBKI_SRCS) \
|
||||
$(addprefix $(SRCDIR)/include/catalog/, indexing.h)
|
||||
ifneq ($(PORTNAME), win) |
||||
sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description
|
||||
else |
||||
$(GENBKI) $(BKIOPTS) $(GLOBALBKI_SRCS) > $@ 2>global1.description
|
||||
endif |
||||
|
||||
local1_template1.bki.source: $(GENBKI) $(LOCALBKI_SRCS) |
||||
ifneq ($(PORTNAME), win) |
||||
sh $(SHOPTS) $(GENBKI) $(BKIOPTS) $(LOCALBKI_SRCS) > $@ 2>local1_template1.description
|
||||
else |
||||
$(GENBKI) $(BKIOPTS) $(LOCALBKI_SRCS) > $@ 2>local1_template1.description
|
||||
endif |
||||
GLOBAL_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
|
||||
pg_database.h pg_variable.h pg_shadow.h pg_group.h pg_log.h \
|
||||
)
|
||||
|
||||
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
|
||||
TEMPLATE1_BKI_SRCS := $(addprefix $(top_srcdir)/src/include/catalog/,\
|
||||
pg_proc.h pg_type.h pg_attribute.h pg_class.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_language.h \
|
||||
pg_aggregate.h pg_ipl.h pg_inheritproc.h \
|
||||
pg_rewrite.h pg_listener.h pg_description.h indexing.h \
|
||||
)
|
||||
|
||||
|
||||
global.bki global.description: genbki.sh $(GLOBAL_BKI_SRCS) $(top_srcdir)/src/include/catalog/indexing.h |
||||
CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $< $(BKIOPTS) -o global -I$(top_srcdir)/src/include $(GLOBAL_BKI_SRCS)
|
||||
|
||||
template1.bki template1.description: genbki.sh $(TEMPLATE1_BKI_SRCS) |
||||
CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $< $(BKIOPTS) -o template1 -I$(top_srcdir)/src/include $(TEMPLATE1_BKI_SRCS)
|
||||
|
||||
.PHONY: install-bki |
||||
install-bki: $(BKIFILES) installdirs |
||||
$(INSTALL_DATA) global.bki $(datadir)/global.bki
|
||||
$(INSTALL_DATA) global.description $(datadir)/global.description
|
||||
$(INSTALL_DATA) template1.bki $(datadir)/template1.bki
|
||||
$(INSTALL_DATA) template1.description $(datadir)/template1.description
|
||||
|
||||
installdirs: |
||||
$(mkinstalldirs) $(datadir)
|
||||
|
||||
.PHONY: uninstall-bki |
||||
uninstall-bki: |
||||
rm -f $(addprefix $(datadir)/, $(BKIFILES))
|
||||
|
||||
depend dep: |
||||
$(CC) -MM $(CFLAGS) *.c >depend
|
||||
|
||||
clean: |
||||
rm -f SUBSYS.o $(OBJS) $(BKIFILES)
|
||||
|
||||
|
||||
depend dep: |
||||
$(CC) -MM $(CFLAGS) *.c >depend
|
||||
|
||||
ifeq (depend,$(wildcard depend)) |
||||
include depend |
||||
endif |
||||
|
@ -1,67 +0,0 @@ |
||||
/*-------------------------------------------------------------------------
|
||||
* |
||||
* fixade.h |
||||
* compiler tricks to make things work while POSTGRES does non-native |
||||
* dereferences on PA-RISC. |
||||
* |
||||
* |
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc |
||||
* Portions Copyright (c) 1994, Regents of the University of California |
||||
* |
||||
* $Id: fixade.h,v 1.8 2000/01/26 05:56:46 momjian Exp $ |
||||
* |
||||
* NOTES |
||||
* This must be included in EVERY source file. |
||||
* |
||||
*------------------------------------------------------------------------- |
||||
*/ |
||||
#ifndef FIXADE_H |
||||
#define FIXADE_H |
||||
|
||||
#if !defined(NOFIXADE) |
||||
|
||||
#if defined(HP_S500_ALIGN) |
||||
/* ----------------
|
||||
* This cheesy hack turns ON unaligned-access fixup on H-P PA-RISC; |
||||
* the resulting object files contain code that explicitly handles |
||||
* realignment on reference, so it slows memory access down by a |
||||
* considerable factor. It must be used in conjunction with the +u |
||||
* flag to cc. The #pragma is included in c.h to be safe since EVERY |
||||
* source file that performs unaligned access must contain the #pragma. |
||||
* ---------------- |
||||
*/ |
||||
#pragma HP_ALIGN HPUX_NATURAL_S500 |
||||
|
||||
#if defined(BROKEN_STRUCT_INIT) |
||||
/* ----------------
|
||||
* This is so bogus. The HP-UX 9.01 compiler has totally broken |
||||
* struct initialization code. It actually length-checks ALL |
||||
* array initializations within structs against the FIRST one that |
||||
* it sees (when #pragma HP_ALIGN HPUX_NATURAL_S500 is defined).. |
||||
* we have to throw in this unused structure before struct varlena |
||||
* is defined. |
||||
* |
||||
* XXX guess you don't need the #pragma anymore after all :-) |
||||
* since no one looks at this except me i think i'll just leave |
||||
* this here for now.. |
||||
* ---------------- |
||||
*/ |
||||
struct HP_WAY_BOGUS |
||||
{ |
||||
char hpwb_bogus[8191 + 1]; |
||||
}; |
||||
struct HP_TOO_BOGUS |
||||
{ |
||||
int hptb_bogus[8191 + 1]; |
||||
}; |
||||
|
||||
#endif /* BROKEN_STRUCT_INIT */ |
||||
#endif /* HP_S500_ALIGN */ |
||||
|
||||
#if defined(WEAK_C_OPTIMIZER) |
||||
#pragma OPT_LEVEL 1 |
||||
#endif /* WEAK_C_OPTIMIZER */ |
||||
|
||||
#endif /* !NOFIXADE */ |
||||
|
||||
#endif /* FIXADE_H */ |
@ -0,0 +1,55 @@ |
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile for src/include
|
||||
#
|
||||
# Install exported headers to the include directory (these headers are
|
||||
# the minimal ones needed to build loadable backend extensions).
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/src/include/Makefile,v 1.1 2000/07/06 21:33:44 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
subdir = src/include
|
||||
top_builddir = ../..
|
||||
include ../Makefile.global |
||||
|
||||
|
||||
HEADERS := os.h config.h c.h postgres.h postgres_ext.h fmgr.h \
|
||||
libpq/pqcomm.h libpq/libpq-fs.h lib/dllist.h \
|
||||
utils/geo_decls.h utils/elog.h utils/fmgroids.h utils/palloc.h \
|
||||
access/attnum.h executor/spi.h commands/trigger.h
|
||||
|
||||
|
||||
all: $(HEADERS) |
||||
|
||||
|
||||
# These rules are necessary in case someone installs the include tree
|
||||
# before building the backend tree. Very messy.
|
||||
utils/fmgroids.h: $(top_builddir)/src/backend/utils/fmgroids.h |
||||
cd utils && rm -f fmgroids.h && $(LN_S) ../$(top_builddir)/src/backend/utils/fmgroids.h .
|
||||
|
||||
# This file is built in the backend tree, but we need to keep track of
|
||||
# the dependencies here.
|
||||
$(top_builddir)/src/backend/utils/fmgroids.h: $(top_srcdir)/src/backend/utils/Gen_fmgrtab.sh catalog/pg_proc.h |
||||
$(MAKE) -C $(dir $@) fmgroids.h
|
||||
|
||||
|
||||
install: all installdirs |
||||
@for i in $(HEADERS); do \
|
||||
echo "$(INSTALL_DATA) $(srcdir)/$$i $(includedir)/$$i"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$i $(includedir)/$$i; \
|
||||
done
|
||||
|
||||
# Automatically pick out the needed subdirectories for the include
|
||||
# tree.
|
||||
installdirs: |
||||
$(mkinstalldirs) $(addprefix $(includedir)/, $(sort $(dir $(HEADERS))))
|
||||
|
||||
uninstall: |
||||
rm -f $(addprefix $(includedir)/, $(HEADERS))
|
||||
|
||||
clean: |
||||
rm -f utils/fmgroids.h parser/parse.h
|
||||
|
||||
distclean maintainer-clean: clean |
||||
rm -f config.h dynloader.h os.h
|
Loading…
Reference in new issue