Commit 3cbb9eb2 authored by Bruce Momjian's avatar Bruce Momjian

Move few remaining src/utils files to backend/port so everything is in

one place.  Everything may be moved to src/utils eventually.

Add DLLINIT variable to simplify makfiles.
parent d76eef3e
...@@ -11603,7 +11603,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then ...@@ -11603,7 +11603,7 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
_ACEOF _ACEOF
else else
STRDUP='$(top_builddir)/src/utils/strdup.o' STRDUP='$(top_builddir)/src/backend/port/strdup.o'
fi fi
done done
...@@ -11846,6 +11846,13 @@ done ...@@ -11846,6 +11846,13 @@ done
# Set path of dllinit.c for cygwin
DLLINIT=""
case $host_os in
cygwin*) DLLINIT='$(top_builddir)/src/backend/port/dllinit.o' ;;
esac
# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a; # On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
# this hackery with HPUXMATHLIB allows us to cope. # this hackery with HPUXMATHLIB allows us to cope.
HPUXMATHLIB="" HPUXMATHLIB=""
...@@ -16673,6 +16680,7 @@ else ...@@ -16673,6 +16680,7 @@ else
sgml/stylesheets/nwalsh-modular \ sgml/stylesheets/nwalsh-modular \
sgml/stylesheets/docbook \ sgml/stylesheets/docbook \
sgml/docbook/dsssl/modular \ sgml/docbook/dsssl/modular \
sgml/docbook/stylesheet/dsssl/modular \
sgml/docbook/dsssl-stylesheets sgml/docbook/dsssl-stylesheets
do do
pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
...@@ -17526,6 +17534,7 @@ s,@STRDUP@,$STRDUP,;t t ...@@ -17526,6 +17534,7 @@ s,@STRDUP@,$STRDUP,;t t
s,@STRTOL@,$STRTOL,;t t s,@STRTOL@,$STRTOL,;t t
s,@STRTOUL@,$STRTOUL,;t t s,@STRTOUL@,$STRTOUL,;t t
s,@STRCASECMP@,$STRCASECMP,;t t s,@STRCASECMP@,$STRCASECMP,;t t
s,@DLLINIT@,$DLLINIT,;t t
s,@HPUXMATHLIB@,$HPUXMATHLIB,;t t s,@HPUXMATHLIB@,$HPUXMATHLIB,;t t
s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
s,@MSGFMT@,$MSGFMT,;t t s,@MSGFMT@,$MSGFMT,;t t
......
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl $Header: /cvsroot/pgsql/configure.in,v 1.189 2002/07/15 22:41:45 momjian Exp $ dnl $Header: /cvsroot/pgsql/configure.in,v 1.190 2002/07/16 05:46:35 momjian Exp $
dnl dnl
dnl Developers, please strive to achieve this order: dnl Developers, please strive to achieve this order:
dnl dnl
...@@ -916,7 +916,7 @@ AC_CHECK_FUNCS(inet_aton, [], INET_ATON='$(top_builddir)/src/backend/port/inet_a ...@@ -916,7 +916,7 @@ AC_CHECK_FUNCS(inet_aton, [], INET_ATON='$(top_builddir)/src/backend/port/inet_a
AC_SUBST(INET_ATON) AC_SUBST(INET_ATON)
AC_CHECK_FUNCS(strerror, [], STRERROR='$(top_builddir)/src/backend/port/strerror.o') AC_CHECK_FUNCS(strerror, [], STRERROR='$(top_builddir)/src/backend/port/strerror.o')
AC_SUBST(STRERROR) AC_SUBST(STRERROR)
AC_CHECK_FUNCS(strdup, [], STRDUP='$(top_builddir)/src/utils/strdup.o') AC_CHECK_FUNCS(strdup, [], STRDUP='$(top_builddir)/src/backend/port/strdup.o')
AC_SUBST(STRDUP) AC_SUBST(STRDUP)
AC_CHECK_FUNCS(strtol, [], STRTOL='$(top_builddir)/src/backend/port/strtol.o') AC_CHECK_FUNCS(strtol, [], STRTOL='$(top_builddir)/src/backend/port/strtol.o')
AC_SUBST(STRTOL) AC_SUBST(STRTOL)
...@@ -925,6 +925,13 @@ AC_SUBST(STRTOUL) ...@@ -925,6 +925,13 @@ AC_SUBST(STRTOUL)
AC_CHECK_FUNCS(strcasecmp, [], STRCASECMP='$(top_builddir)/src/backend/port/strcasecmp.o') AC_CHECK_FUNCS(strcasecmp, [], STRCASECMP='$(top_builddir)/src/backend/port/strcasecmp.o')
AC_SUBST(STRCASECMP) AC_SUBST(STRCASECMP)
# Set path of dllinit.c for cygwin
DLLINIT=""
case $host_os in
cygwin*) DLLINIT='$(top_builddir)/src/backend/port/dllinit.o' ;;
esac
AC_SUBST(DLLINIT)
# On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a; # On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
# this hackery with HPUXMATHLIB allows us to cope. # this hackery with HPUXMATHLIB allows us to cope.
HPUXMATHLIB="" HPUXMATHLIB=""
......
# -*-makefile-*- # -*-makefile-*-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.148 2002/05/28 16:57:53 petere Exp $ # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.149 2002/07/16 05:46:35 momjian Exp $
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets, # All PostgreSQL makefiles include this file and use the variables it sets,
...@@ -359,6 +359,7 @@ STRDUP = @STRDUP@ ...@@ -359,6 +359,7 @@ STRDUP = @STRDUP@
STRERROR = @STRERROR@ STRERROR = @STRERROR@
STRTOL = @STRTOL@ STRTOL = @STRTOL@
STRTOUL = @STRTOUL@ STRTOUL = @STRTOUL@
DLLINIT = @DLLINIT@
TAS = @TAS@ TAS = @TAS@
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California # Copyright (c) 1998, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.58 2002/05/24 18:10:17 petere Exp $ # $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.59 2002/07/16 05:46:35 momjian Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -327,13 +327,13 @@ endif # PORTNAME == aix ...@@ -327,13 +327,13 @@ endif # PORTNAME == aix
else # PORTNAME == win else # PORTNAME == win
# WIN case # WIN case
$(shlib) lib$(NAME).a: $(OBJS) $(top_builddir)/src/utils/dllinit.o $(shlib) lib$(NAME).a: $(OBJS) $(DLLINIT)
$(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS) $(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS)
$(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(top_builddir)/src/utils/dllinit.o $(DLLINIT) $(DLLLIBS) $(SHLIB_LINK) $(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(DLLINIT) $(DLLLIBS) $(SHLIB_LINK)
$(DLLTOOL) --dllname $(shlib) --def $(NAME).def --output-lib lib$(NAME).a $(DLLTOOL) --dllname $(shlib) --def $(NAME).def --output-lib lib$(NAME).a
$(top_builddir)/src/utils/dllinit.o: $(top_srcdir)/src/utils/dllinit.c $(DLLINIT):
$(MAKE) -C $(top_builddir)/src/utils dllinit.o $(MAKE) -C $(@D) $(@F)
endif # PORTNAME == win endif # PORTNAME == win
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.79 2002/05/22 21:46:40 tgl Exp $ # $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.80 2002/07/16 05:46:35 momjian Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -43,7 +43,7 @@ else # win ...@@ -43,7 +43,7 @@ else # win
# No points for style here. How about encapsulating some of these # No points for style here. How about encapsulating some of these
# commands into variables? # commands into variables?
postgres: $(OBJS) $(top_builddir)/src/utils/dllinit.o postgres.def libpostgres.a postgres: $(OBJS) $(DLLINIT) postgres.def libpostgres.a
dlltool --dllname $@$(X) --output-exp $@.exp --def postgres.def dlltool --dllname $@$(X) --output-exp $@.exp --def postgres.def
gcc $(LDFLAGS) -g -o $@$(X) -Wl,--base-file,$@.base $@.exp $(OBJS) $(DLLLIBS) gcc $(LDFLAGS) -g -o $@$(X) -Wl,--base-file,$@.base $@.exp $(OBJS) $(DLLLIBS)
dlltool --dllname $@$(X) --base-file $@.base --output-exp $@.exp --def postgres.def dlltool --dllname $@$(X) --base-file $@.base --output-exp $@.exp --def postgres.def
...@@ -67,14 +67,14 @@ ifeq ($(MAKE_DLL), true) ...@@ -67,14 +67,14 @@ ifeq ($(MAKE_DLL), true)
postgres.def: $(OBJS) postgres.def: $(OBJS)
$(DLLTOOL) --export-all --output-def $@ $(OBJS) $(DLLTOOL) --export-all --output-def $@ $(OBJS)
libpostgres.a: $(OBJS) $(top_builddir)/src/utils/dllinit.o postgres.def libpostgres.a: $(OBJS) $(DLLINIT) postgres.def
$(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@ $(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
endif # MAKE_DLL endif # MAKE_DLL
$(top_builddir)/src/utils/dllinit.o: $(top_srcdir)/src/utils/dllinit.c $(DLLINIT):
$(MAKE) -C $(top_builddir)/src/utils dllinit.o $(MAKE) -C $(@D) $(@F)
# 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.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/utils/Attic/strdup.c,v 1.9 2002/06/20 20:29:54 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/Attic/strdup.c,v 1.3 2002/07/16 05:46:35 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.15 2001/09/06 02:58:33 momjian Exp $ # $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.16 2002/07/16 05:46:35 momjian Exp $
LDFLAGS+= -g LDFLAGS+= -g
DLLTOOL= dlltool DLLTOOL= dlltool
DLLWRAP= dllwrap DLLWRAP= dllwrap
...@@ -17,7 +17,7 @@ CFLAGS_SL = ...@@ -17,7 +17,7 @@ CFLAGS_SL =
%.dll: %.o %.dll: %.o
$(DLLTOOL) --export-all --output-def $*.def $< $(DLLTOOL) --export-all --output-def $*.def $<
$(DLLWRAP) -o $@ --def $*.def $< $(top_builddir)/src/utils/dllinit.o $(DLLLIBS) $(DLLWRAP) -o $@ --def $*.def $< $(DLLINIT) $(DLLLIBS)
rm -f $*.def rm -f $*.def
ifeq ($(findstring backend,$(subdir)), backend) ifeq ($(findstring backend,$(subdir)), backend)
......
#-------------------------------------------------------------------------
#
# Makefile for utils
#
# $Header: /cvsroot/pgsql/src/utils/Attic/Makefile,v 1.12 2002/07/15 23:32:28 momjian Exp $
#
# About strdup: Some systems have strdup in their standard library, others
# don't. Ones that don't will use this make file to compile the strdup.c
# in this directory. (You don't see strdup mentioned because the implicit
# rule does the job). We don't make strdup.o unless asked to explicitly
# because the strdup.c in this directory may conflict with the strdup()
# prototype from the system library and cause a compile error.
#
# dllinit.o is only built on Win32 platform.
#
#-------------------------------------------------------------------------
subdir = src/utils
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
all:
# Nothing required here. These C files are compiled in
# directories as needed.
clean distclean maintainer-clean:
rm -f dllinit.o strdup.o
depend dep:
$(CC) $(CFLAGS) -MM *.c >depend
ifeq (depend,$(wildcard depend))
include depend
endif
The utils directory contains components that are used by multiple subsystems
in the Postgres source tree. We don't want subsystems reaching into other
subsystems' directories and messing with the modularity of the system, so
we gather any cross-subsystem utilities here.
In particular, programs that form an interface between subsystems go here.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment