提交 5b9d0d9a 编写于 作者: P Peter Eisentraut

Moved configure script from src/ to the top level directory. Moved

configuration helper things into config/ dir. Adjusted some relative paths
in makefiles.
上级 42ad25fc
#
# PostgreSQL top level makefile
#
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.1 2000/06/06 22:00:45 petere Exp $
#
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = .
all:
make -C src all
@echo "All of PostgreSQL successfully made. Ready to install."
install:
make -C src install
@cat $(srcdir)/register.txt
clean:
make -C src clean
distclean:
make -C src distclean
-rm -f config.cache config.log config.status GNUmakefile
.PHONY: all install clean distclean
此差异已折叠。
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_INIT(backend/access/common/heaptuple.c) AC_INIT(src/backend/access/common/heaptuple.c)
AC_PREFIX_DEFAULT(/usr/local/pgsql) AC_PREFIX_DEFAULT(/usr/local/pgsql)
AC_CONFIG_HEADER(include/config.h) AC_CONFIG_HEADER(src/include/config.h)
dnl Autoconf 2.12, at least, generates a useless relative path to install-sh AC_PREREQ(2.13)
dnl unless we do this. AC_CONFIG_AUX_DIR(config)
AC_CONFIG_AUX_DIR(`pwd`)
AC_CANONICAL_HOST AC_CANONICAL_HOST
...@@ -58,14 +57,14 @@ esac ...@@ -58,14 +57,14 @@ esac
PORTNAME=${os} PORTNAME=${os}
CPU=${host_cpu} CPU=${host_cpu}
AC_LINK_FILES(backend/port/dynloader/${os}.c, backend/port/dynloader.c) AC_LINK_FILES(src/backend/port/dynloader/${os}.c, src/backend/port/dynloader.c)
AC_LINK_FILES(backend/port/dynloader/${os}.h, include/dynloader.h) AC_LINK_FILES(src/backend/port/dynloader/${os}.h, src/include/dynloader.h)
AC_LINK_FILES(include/port/${os}.h, include/os.h) AC_LINK_FILES(src/include/port/${os}.h, src/include/os.h)
AC_LINK_FILES(makefiles/Makefile.${os}, Makefile.port) AC_LINK_FILES(src/makefiles/Makefile.${os}, src/Makefile.port)
if test "X$need_tas" = "Xyes" if test "X$need_tas" = "Xyes"
then then
AC_LINK_FILES(backend/port/tas/${tas_file}, backend/port/tas.s) AC_LINK_FILES(src/backend/port/tas/${tas_file}, src/backend/port/tas.s)
TAS=tas.o TAS=tas.o
AC_SUBST(TAS) AC_SUBST(TAS)
fi fi
...@@ -94,7 +93,7 @@ AC_ARG_WITH(template, ...@@ -94,7 +93,7 @@ AC_ARG_WITH(template,
host="`echo $host | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`" host="`echo $host | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`"
# First, try for a template exactly matching $host # First, try for a template exactly matching $host
if test -f "template/$host" if test -f "src/template/$host"
then TEMPLATE="$host" then TEMPLATE="$host"
else else
# Scan template/.similar for a rule that tells us which template to use. # Scan template/.similar for a rule that tells us which template to use.
...@@ -117,7 +116,7 @@ else ...@@ -117,7 +116,7 @@ else
then then
echo "$LINE" | sed 's/^.*=//' > $TMPFILE echo "$LINE" | sed 's/^.*=//' > $TMPFILE
fi fi
done <template/.similar done <src/template/.similar
GUESS=`cat $TMPFILE` GUESS=`cat $TMPFILE`
rm -f $TMPFILE rm -f $TMPFILE
if test "$GUESS" if test "$GUESS"
...@@ -131,7 +130,7 @@ fi ...@@ -131,7 +130,7 @@ fi
AC_MSG_RESULT($TEMPLATE) AC_MSG_RESULT($TEMPLATE)
export TEMPLATE export TEMPLATE
if test ! -f "template/$TEMPLATE"; then if test ! -f "src/template/$TEMPLATE"; then
echo "" echo ""
echo "$TEMPLATE does not exist" echo "$TEMPLATE does not exist"
echo "" echo ""
...@@ -152,7 +151,7 @@ dnl the IDENTIFIER: lines translated, then source it. ...@@ -152,7 +151,7 @@ dnl the IDENTIFIER: lines translated, then source it.
[ [
rm -f conftest.sh rm -f conftest.sh
sed 's/^\([A-Za-z_]*\):\(.*\)$/\1="\2"/' "template/$TEMPLATE" >conftest.sh sed 's/^\([A-Za-z_]*\):\(.*\)$/\1="\2"/' "src/template/$TEMPLATE" >conftest.sh
. ./conftest.sh . ./conftest.sh
rm -f conftest.sh rm -f conftest.sh
] ]
...@@ -381,10 +380,10 @@ dnl Link in the port and template directories ...@@ -381,10 +380,10 @@ dnl Link in the port and template directories
dnl to help build a "standalone ODBC" tar file dnl to help build a "standalone ODBC" tar file
if test "X$USE_ODBC" = "Xtrue" if test "X$USE_ODBC" = "Xtrue"
then then
AC_LINK_FILES(include/port, interfaces/odbc/port) AC_LINK_FILES(src/include/port, src/interfaces/odbc/port)
AC_LINK_FILES(makefiles, interfaces/odbc/makefiles) AC_LINK_FILES(src/makefiles, src/interfaces/odbc/makefiles)
AC_LINK_FILES(template, interfaces/odbc/template) AC_LINK_FILES(src/template, src/interfaces/odbc/template)
AC_LINK_FILES(include/config.h, interfaces/odbc/config.h) AC_LINK_FILES(src/include/config.h, src/interfaces/odbc/config.h)
AC_MSG_CHECKING(setting ODBCINST) AC_MSG_CHECKING(setting ODBCINST)
AC_ARG_WITH( AC_ARG_WITH(
...@@ -1365,26 +1364,27 @@ dnl Finally ready to produce output files ... ...@@ -1365,26 +1364,27 @@ dnl Finally ready to produce output files ...
AC_OUTPUT( AC_OUTPUT(
GNUmakefile GNUmakefile
Makefile.global src/GNUmakefile
backend/port/Makefile src/Makefile.global
backend/catalog/genbki.sh src/backend/port/Makefile
backend/utils/Gen_fmgrtab.sh src/backend/catalog/genbki.sh
bin/pg_dump/Makefile src/backend/utils/Gen_fmgrtab.sh
bin/pg_version/Makefile src/bin/pg_dump/Makefile
bin/pgtclsh/mkMakefile.tcldefs.sh src/bin/pg_version/Makefile
bin/pgtclsh/mkMakefile.tkdefs.sh src/bin/pgtclsh/mkMakefile.tcldefs.sh
bin/psql/Makefile src/bin/pgtclsh/mkMakefile.tkdefs.sh
include/version.h src/bin/psql/Makefile
interfaces/libpq/Makefile src/include/version.h
interfaces/ecpg/lib/Makefile src/interfaces/libpq/Makefile
interfaces/ecpg/preproc/Makefile src/interfaces/ecpg/lib/Makefile
interfaces/libpq++/Makefile src/interfaces/ecpg/preproc/Makefile
interfaces/libpgeasy/Makefile src/interfaces/libpq++/Makefile
interfaces/libpgtcl/Makefile src/interfaces/libpgeasy/Makefile
interfaces/odbc/GNUmakefile src/interfaces/libpgtcl/Makefile
interfaces/odbc/Makefile.global src/interfaces/odbc/GNUmakefile
pl/plpgsql/src/Makefile src/interfaces/odbc/Makefile.global
pl/plpgsql/src/mklang.sql src/pl/plpgsql/src/Makefile
pl/tcl/mkMakefile.tcldefs.sh src/pl/plpgsql/src/mklang.sql
test/regress/GNUmakefile src/pl/tcl/mkMakefile.tcldefs.sh
src/test/regress/GNUmakefile
) )
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.50 2000/02/28 23:28:40 momjian Exp $ # $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.51 2000/06/06 22:00:47 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -29,9 +29,6 @@ all: ...@@ -29,9 +29,6 @@ all:
$(MAKE) -C interfaces all $(MAKE) -C interfaces all
$(MAKE) -C bin all $(MAKE) -C bin all
$(MAKE) -C pl all $(MAKE) -C pl all
@if test $@. = all. -o $@. = .; then \
echo All of PostgreSQL is successfully made. Ready to install. ;\
fi
install: installdirs install: installdirs
$(MAKE) -C utils install $(MAKE) -C utils install
...@@ -39,10 +36,9 @@ install: installdirs ...@@ -39,10 +36,9 @@ install: installdirs
$(MAKE) -C interfaces install $(MAKE) -C interfaces install
$(MAKE) -C bin install $(MAKE) -C bin install
$(MAKE) -C pl install $(MAKE) -C pl install
cat ../register.txt
installdirs: mkinstalldirs installdirs:
$(SRCDIR)/mkinstalldirs $(BINDIR) $(LIBDIR) $(INCLUDEDIR) ../config/mkinstalldirs $(BINDIR) $(LIBDIR) $(INCLUDEDIR)
clean: clean:
$(MAKE) -C utils clean $(MAKE) -C utils clean
...@@ -53,13 +49,10 @@ clean: ...@@ -53,13 +49,10 @@ clean:
$(MAKE) -C test clean $(MAKE) -C test clean
$(MAKE) -C ../contrib/spi clean $(MAKE) -C ../contrib/spi clean
# Remove files and symlinks created by configure script
distclean: clean distclean: clean
# Remove files and symlinks created by configure script
rm -f \ rm -f \
Makefile.port \ Makefile.port \
config.cache \
config.status \
config.log \
include/config.h \ include/config.h \
include/dynloader.h \ include/dynloader.h \
include/os.h \ include/os.h \
...@@ -103,9 +96,6 @@ distclean: clean ...@@ -103,9 +96,6 @@ distclean: clean
$(MAKE) -C interfaces $@ $(MAKE) -C interfaces $@
$(MAKE) -C bin $@ $(MAKE) -C bin $@
$(MAKE) -C pl $@ $(MAKE) -C pl $@
@if test $@. = all. -o $@. = .; then \
echo All of PostgreSQL is successfully made. Ready to install. ;\
fi
TAGS: TAGS:
rm -f TAGS; \ rm -f TAGS; \
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.66 2000/05/17 06:03:13 meskes Exp $ # $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.67 2000/06/06 22:00:52 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -14,7 +14,7 @@ NAME= ecpg ...@@ -14,7 +14,7 @@ NAME= ecpg
SO_MAJOR_VERSION= 3 SO_MAJOR_VERSION= 3
SO_MINOR_VERSION= 1.1 SO_MINOR_VERSION= 1.1
SRCDIR= @top_srcdir@ SRCDIR= ../../..
include $(SRCDIR)/Makefile.global include $(SRCDIR)/Makefile.global
CFLAGS+= -I../include -I$(LIBPQDIR) CFLAGS+= -I../include -I$(LIBPQDIR)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for pgeasy library # Makefile for pgeasy library
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile.in,v 1.6 2000/03/08 01:58:33 momjian Exp $ # $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile.in,v 1.7 2000/06/06 22:00:53 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -12,7 +12,7 @@ NAME= pgeasy ...@@ -12,7 +12,7 @@ NAME= pgeasy
SO_MAJOR_VERSION= 2 SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 1 SO_MINOR_VERSION= 1
SRCDIR= @top_srcdir@ SRCDIR= ../..
include $(SRCDIR)/Makefile.global include $(SRCDIR)/Makefile.global
CFLAGS+= -I$(LIBPQDIR) CFLAGS+= -I$(LIBPQDIR)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.40 2000/05/29 05:45:48 tgl Exp $ # $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.41 2000/06/06 22:01:01 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -14,7 +14,7 @@ NAME= pgtcl ...@@ -14,7 +14,7 @@ NAME= pgtcl
SO_MAJOR_VERSION= 2 SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 1 SO_MINOR_VERSION= 1
SRCDIR= @top_srcdir@ SRCDIR= ../..
include $(SRCDIR)/Makefile.global include $(SRCDIR)/Makefile.global
CFLAGS+= -I$(LIBPQDIR) CFLAGS+= -I$(LIBPQDIR)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.25 2000/05/29 05:45:50 tgl Exp $ # $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.26 2000/06/06 22:01:06 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -14,7 +14,7 @@ NAME= pq++ ...@@ -14,7 +14,7 @@ NAME= pq++
SO_MAJOR_VERSION= 3 SO_MAJOR_VERSION= 3
SO_MINOR_VERSION= 1 SO_MINOR_VERSION= 1
SRCDIR= @top_srcdir@ SRCDIR= ../..
include $(SRCDIR)/Makefile.global include $(SRCDIR)/Makefile.global
CXX=@CXX@ CXX=@CXX@
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.58 2000/05/28 17:56:25 tgl Exp $ # $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.59 2000/06/06 22:01:03 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -14,7 +14,7 @@ NAME= pq ...@@ -14,7 +14,7 @@ NAME= pq
SO_MAJOR_VERSION= 2 SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 1 SO_MINOR_VERSION= 1
SRCDIR= @top_srcdir@ SRCDIR= ../..
include $(SRCDIR)/Makefile.global include $(SRCDIR)/Makefile.global
CFLAGS+= -DFRONTEND CFLAGS+= -DFRONTEND
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile.in,v 1.12 2000/03/02 02:01:00 momjian Exp $ # $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile.in,v 1.13 2000/06/06 22:01:09 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@SET_MAKE@ @SET_MAKE@
NAME = psqlodbc NAME = psqlodbc
SRCDIR= @top_srcdir@ SRCDIR= ../..
ODBCSRCDIR= @srcdir@ ODBCSRCDIR= @srcdir@
include $(SRCDIR)/Makefile.global include $(SRCDIR)/Makefile.global
...@@ -91,7 +91,7 @@ standalone: ...@@ -91,7 +91,7 @@ standalone:
fi fi
-rm -f psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION).tar.gz -rm -f psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION).tar.gz
$(TAR) -chf psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION).tar \ $(TAR) -chf psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION).tar \
$(SOURCES) -C @top_srcdir@ makefiles template Makefile.shlib $(SOURCES) -C $(SRCDIR) makefiles template Makefile.shlib
gzip psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION).tar gzip psqlodbc-$(SO_MAJOR_VERSION)$(SO_MINOR_VERSION).tar
.PHONY: integrated .PHONY: integrated
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for the plpgsql shared object # Makefile for the plpgsql shared object
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/Makefile.in,v 1.23 2000/05/29 05:45:53 tgl Exp $ # $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/Makefile.in,v 1.24 2000/06/06 22:01:12 petere Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -12,7 +12,7 @@ NAME= plpgsql ...@@ -12,7 +12,7 @@ NAME= plpgsql
SO_MAJOR_VERSION= 1 SO_MAJOR_VERSION= 1
SO_MINOR_VERSION= 0 SO_MINOR_VERSION= 0
SRCDIR= @top_srcdir@ SRCDIR= ../../..
include $(SRCDIR)/Makefile.global include $(SRCDIR)/Makefile.global
# If using flex, ask for a case-insensitive, lex-compatible lexer. # If using flex, ask for a case-insensitive, lex-compatible lexer.
......
...@@ -25,53 +25,51 @@ ...@@ -25,53 +25,51 @@
# Select make to use --- default gmake, can be overridden by env var # Select make to use --- default gmake, can be overridden by env var
MAKE=${MAKE:-gmake} MAKE=${MAKE:-gmake}
cd src
# Configure ... should we run autoconf here??? # Configure ... should we run autoconf here???
./configure ./configure
# Generate parser's yacc and lex files # Generate parser's yacc and lex files
cd backend/parser cd src/backend/parser
rm -f gram.c parse.h scan.c rm -f gram.c parse.h scan.c
$MAKE gram.c parse.h scan.c $MAKE gram.c parse.h scan.c
cd ../.. cd ../../..
# Generate bootstrap parser's yacc and lex files # Generate bootstrap parser's yacc and lex files
cd backend/bootstrap cd src/backend/bootstrap
rm -f bootstrap_tokens.h bootparse.c bootscanner.c rm -f bootstrap_tokens.h bootparse.c bootscanner.c
$MAKE bootstrap_tokens.h bootparse.c bootscanner.c $MAKE bootstrap_tokens.h bootparse.c bootscanner.c
cd ../.. cd ../../..
# Generate configuration file scanner # Generate configuration file scanner
cd backend/utils/misc cd src/backend/utils/misc
rm -f guc-file.c lex.yy.c rm -f guc-file.c lex.yy.c
$MAKE guc-file.c $MAKE guc-file.c
cd ../../.. cd ../../../..
# Generate ecpg preprocessor's yacc and lex files # Generate ecpg preprocessor's yacc and lex files
cd interfaces/ecpg/preproc cd src/interfaces/ecpg/preproc
rm -f preproc.c preproc.h pgc.c rm -f preproc.c preproc.h pgc.c
$MAKE preproc.c preproc.h pgc.c $MAKE preproc.c preproc.h pgc.c
cd ../../.. cd ../../../..
# Generate plpgsql's yacc and lex files # Generate plpgsql's yacc and lex files
cd pl/plpgsql/src cd src/pl/plpgsql/src
rm -f pl_scan.c pl.tab.h pl_gram.c rm -f pl_scan.c pl.tab.h pl_gram.c
$MAKE pl_scan.c pl.tab.h pl_gram.c $MAKE pl_scan.c pl.tab.h pl_gram.c
cd ../../.. cd ../../../..
# Generate psql's help on SQL command from the SGML docs # Generate psql's help on SQL command from the SGML docs
cd bin/psql cd src/bin/psql
rm -f sql_help.h rm -f sql_help.h
$MAKE sql_help.h $MAKE sql_help.h
cd ../.. cd ../../..
# Clean up # Clean up
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册