Remove configure code from ecpg, as well as remove the 'for' loop from the

Makefile, as it isn't appropriate for GNUmake
This commit is contained in:
Marc G. Fournier 1998-02-12 02:14:59 +00:00
parent 1e7fed7fd9
commit 7783c2b9ff
7 changed files with 65 additions and 1095 deletions

View File

@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.5 1998/02/11 15:17:47 scrappy Exp $ # $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.6 1998/02/12 02:14:14 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -16,7 +16,7 @@ include $(SRCDIR)/Makefile.global
.DEFAULT all: .DEFAULT all:
$(MAKE) -C libpq $@ $(MAKE) -C libpq $@
$(MAKE) -C ecpg $@ # $(MAKE) -C ecpg $@
ifeq ($(HAVE_Cplusplus), true) ifeq ($(HAVE_Cplusplus), true)
$(MAKE) -C libpq++ $@ $(MAKE) -C libpq++ $@
else else

View File

@ -1,4 +1,7 @@
SUBDIRS = include lib preproc doc SUBDIRS = include lib preproc doc
all install uninstall clean: all install uninstall clean:
for i in $(SUBDIRS); do ( cd $$i; make $@ ); done $(MAKE) -C include $@
$(MAKE) -C lib $@
$(MAKE) -C preproc $@
$(MAKE) -C doc $@

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/preproc/type.c)
AC_PROG_CC
AC_PROG_LEX
AC_PROG_YACC
dnl This is actually not pwd, it is the location of the configure file.
dnl This handling, and the fact that not all Makefiles are created by
dnl this configure script makes it impossible to compile somewhere else.
[TOPSRC=`pwd`/../..]
AC_SUBST(TOPSRC)
AC_OUTPUT(src/include/Makefile src/lib/Makefile src/preproc/Makefile src/preproc/ecpg)

View File

@ -6,11 +6,11 @@ all clean::
@echo Nothing to be done. @echo Nothing to be done.
install:: install::
install ecpglib.h $(HEADERDIR) install ecpglib.h $(DESTDIR)$(HEADERDIR)
install ecpgtype.h $(HEADERDIR) install ecpgtype.h $(DESTDIR)$(HEADERDIR)
install sqlca.h $(HEADERDIR) install sqlca.h $(DESTDIR)$(HEADERDIR)
uninstall:: uninstall::
rm -f $(HEADERDIR)/ecpglib.h rm -f $(DESTDIR)$(HEADERDIR)/ecpglib.h
rm -f $(HEADERDIR)/ecpgtype.h rm -f $(DESTDIR)$(HEADERDIR)/ecpgtype.h
rm -f $(HEADERDIR)/sqlca.h rm -f $(DESTDIR)$(HEADERDIR)/sqlca.h

View File

@ -4,18 +4,57 @@ include $(SRCDIR)/Makefile.global
PQ_INCLUDE=-I$(SRCDIR)/include -I$(SRCDIR)/interfaces/libpq PQ_INCLUDE=-I$(SRCDIR)/include -I$(SRCDIR)/interfaces/libpq
all: lib SO_MAJOR_VERSION=0
SO_MINOR_VERSION=5
lib: libecpg.a PORTNAME=bsd
# Shared library stuff
shlib :=
install-shlib-dep :=
ifeq ($(PORTNAME), linux)
ifdef LINUX_ELF
install-shlib-dep := install-shlib
shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL = -shared
CFLAGS += $(CFLAGS_SL)
endif
endif
ifeq ($(PORTNAME), bsd)
install-shlib-dep := install-shlib
shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL = -x -Bshareable -Bforcearchive
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), i386_solaris)
install-shlib-dep := install-shlib
shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL = -G -z text
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), univel)
install-shlib-dep := install-shlib
shlib := libecpg.so.1
LDFLAGS_SL = -G -z text
CFLAGS += $(CFLAGS_SL)
endif
all: libecpg.a $(shlib)
$(shlib): ecpglib.o typename.o
$(LD) $(LDFLAGS_SL) -o $@ ecpglib.o typename.o
ln -sf $@ libecpg.so
clean: clean:
rm -f *.o *.a core a.out *~ rm -f *.o *.a core a.out *~ $(shlib) libecpg.so
install: libecpg.a install: libecpg.a
install -m 644 libecpg.a $(LIBDIR) install -m 644 libecpg.a $(DESTDIR)$(LIBDIR)
install -m 644 $(shlib) $(DESTDIR)$(LIBDIR)
ln -sf $(shlib) $(DESTDIR)$(LIBDIR)/libecpg.so
uninstall:: uninstall::
rm -f $(LIBDIR)/libecpg.a rm -f $(DESTDIR)$(LIBDIR)/libecpg.a $(DESTDIR)$(LIBDIR)/$(shlib)
# Rules that do something # Rules that do something
libecpg.a : libecpg.a(ecpglib.o) libecpg.a(typename.o) libecpg.a : libecpg.a(ecpglib.o) libecpg.a(typename.o)

View File

@ -2,13 +2,17 @@
SRCDIR= ../../.. SRCDIR= ../../..
include $(SRCDIR)/Makefile.global include $(SRCDIR)/Makefile.global
MAJOR_VERSION=0
MINOR_VERSION=5
PATCHLEVEL=1
CC=gcc CC=gcc
LEX=flex LEX=flex
LEXLIB=-lfl LEXLIB=-lfl
YACC=/usr/bin/bison YACC=/usr/bin/bison
YFLAGS=-y -d YFLAGS=-y -d
CFLAGS=-I../include -O2 -g -Wall CFLAGS=-I../include -O2 -g -Wall -DMAJOR_VERSION=$(MAJOR_VERSION) -DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL)
all:: ecpg all:: ecpg
@ -16,14 +20,14 @@ clean:
rm -f *.o core a.out ecpg preproc.tab.h y.tab.c *~ rm -f *.o core a.out ecpg preproc.tab.h y.tab.c *~
install: all install: all
install -c -m 755 ecpg $(BINDIR) install -c -m 755 ecpg $(DESTDIR)$(BINDIR)
uninstall: uninstall:
rm -f $(BINDIR)/ecpg rm -f $(DESTDIR)$(BINDIR)/ecpg
# Rule that really do something. # Rule that really do something.
ecpg: y.tab.o pgc.o type.o ecpg.o ecpg: y.tab.o pgc.o type.o ecpg.o ../lib/typename.o
$(CC) -g -O2 -Wall -o ecpg y.tab.o pgc.o type.o ecpg.o -L../lib -lecpg $(LEXLIB) $(CC) -g -O2 -Wall -o ecpg y.tab.o pgc.o type.o ecpg.o ../lib/typename.o $(LEXLIB)
y.tab.h y.tab.c: preproc.y y.tab.h y.tab.c: preproc.y
$(YACC) $(YFLAGS) $< $(YACC) $(YFLAGS) $<