mirror of
https://github.com/postgres/postgres.git
synced 2025-11-21 00:42:43 +03:00
Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with Makefile's and declared the respective variables in Makefile.global. maintainer-clean target now available at top level, although it does not work in the backend tree yet. Cleanup pass over Makefile.shlib, renamed some targets and variables. The shared library symlink tests are now done by make, not the shell. ecpg: Remove one warning in sloppy flex output. PL/Perl and Perl interface: the MakeMaker documentation is confusing, the realclean target *does* "delete derived files", but it also uninstalls them. Don't use that. The submake targets in the various bin directories that update libpq should `make all', not `make libpq.a'. That is a) unportable, and b) doesn't build the shared library.
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
all install uninstall clean dep depend:
|
||||
subdir = src/interfaces/ecpg
|
||||
top_builddir = ../../..
|
||||
include ../../Makefile.global
|
||||
|
||||
all install installdirs uninstall dep depend:
|
||||
$(MAKE) -C include $@
|
||||
$(MAKE) -C lib $@
|
||||
$(MAKE) -C preproc $@
|
||||
|
||||
clean distclean maintainer-clean:
|
||||
-$(MAKE) -C include $@
|
||||
-$(MAKE) -C lib $@
|
||||
-$(MAKE) -C preproc $@
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
SRCDIR= ../../..
|
||||
include $(SRCDIR)/Makefile.global
|
||||
subdir = src/interfaces/ecpg/include
|
||||
top_builddir = ../../../..
|
||||
include ../../../Makefile.global
|
||||
|
||||
all clean::
|
||||
@echo Nothing to be done.
|
||||
install: all installdirs install-headers
|
||||
|
||||
install::
|
||||
$(INSTALL) $(INSTLOPTS) ecpgerrno.h $(HEADERDIR)
|
||||
$(INSTALL) $(INSTLOPTS) ecpglib.h $(HEADERDIR)
|
||||
$(INSTALL) $(INSTLOPTS) ecpgtype.h $(HEADERDIR)
|
||||
$(INSTALL) $(INSTLOPTS) sqlca.h $(HEADERDIR)
|
||||
$(INSTALL) $(INSTLOPTS) sql3types.h $(HEADERDIR)
|
||||
.PHONY: install-headers
|
||||
ecpg_headers = ecpgerrno.h ecpglib.h ecpgtype.h sqlca.h sql3types.h
|
||||
install-headers: $(ecpg_headers)
|
||||
for i in $^; do $(INSTALL_DATA) $$i $(includedir); done
|
||||
|
||||
uninstall::
|
||||
rm -f $(HEADERDIR)/ecpgerrno.h
|
||||
rm -f $(HEADERDIR)/ecpglib.h
|
||||
rm -f $(HEADERDIR)/ecpgtype.h
|
||||
rm -f $(HEADERDIR)/sqlca.h
|
||||
rm -f $(HEADERDIR)/sql3types.h
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(includedir)
|
||||
|
||||
dep depend:
|
||||
uninstall:
|
||||
rm -f $(addprefix $(includedir)/, $(ecpg_headers))
|
||||
|
||||
47
src/interfaces/ecpg/lib/Makefile
Normal file
47
src/interfaces/ecpg/lib/Makefile
Normal file
@@ -0,0 +1,47 @@
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile for ecpg library
|
||||
#
|
||||
# Copyright (c) 1994, Regents of the University of California
|
||||
#
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile,v 1.6 2000/06/28 18:29:39 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
subdir = src/interfaces/ecpg/lib
|
||||
top_builddir = ../../../..
|
||||
include ../../../Makefile.global
|
||||
|
||||
NAME= ecpg
|
||||
SO_MAJOR_VERSION= 3
|
||||
SO_MINOR_VERSION= 1.1
|
||||
|
||||
CFLAGS+= -I$(top_srcdir)/src/interfaces/ecpg/include -I$(LIBPQDIR)
|
||||
|
||||
|
||||
OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
|
||||
connect.o misc.o
|
||||
|
||||
SHLIB_LINK= $(LIBPQ)
|
||||
|
||||
all: all-lib
|
||||
|
||||
# Shared library stuff
|
||||
include $(top_srcdir)/src/Makefile.shlib
|
||||
|
||||
install: all installdirs install-lib
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(libdir)
|
||||
|
||||
uninstall: uninstall-lib
|
||||
|
||||
clean distclean maintainer-clean: clean-lib
|
||||
rm -f $(OBJS)
|
||||
|
||||
depend dep:
|
||||
$(CC) -MM $(CFLAGS) *.c >depend
|
||||
|
||||
ifeq (depend,$(wildcard depend))
|
||||
include depend
|
||||
endif
|
||||
@@ -1,46 +0,0 @@
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Makefile
|
||||
# Makefile for ecpg library
|
||||
#
|
||||
# Copyright (c) 1994, Regents of the University of California
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.68 2000/06/17 00:09:59 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
NAME= ecpg
|
||||
SO_MAJOR_VERSION= 3
|
||||
SO_MINOR_VERSION= 1.1
|
||||
|
||||
SRCDIR= ../../..
|
||||
include $(SRCDIR)/Makefile.global
|
||||
|
||||
CFLAGS+= -I../include -I$(LIBPQDIR)
|
||||
|
||||
|
||||
OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
|
||||
connect.o misc.o
|
||||
|
||||
SHLIB_LINK= $(LIBPQ)
|
||||
|
||||
# Shared library stuff, also default 'all' target
|
||||
include $(SRCDIR)/Makefile.shlib
|
||||
|
||||
|
||||
.PHONY: install
|
||||
|
||||
install: install-lib $(install-shlib-dep)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean: clean-shlib
|
||||
rm -f lib$(NAME).a $(OBJS)
|
||||
|
||||
depend dep:
|
||||
$(CC) -MM $(CFLAGS) *.c >depend
|
||||
|
||||
ifeq (depend,$(wildcard depend))
|
||||
include depend
|
||||
endif
|
||||
66
src/interfaces/ecpg/preproc/Makefile
Normal file
66
src/interfaces/ecpg/preproc/Makefile
Normal file
@@ -0,0 +1,66 @@
|
||||
subdir = src/interfaces/ecpg/preproc
|
||||
top_builddir = ../../../..
|
||||
include ../../../Makefile.global
|
||||
|
||||
MAJOR_VERSION=2
|
||||
MINOR_VERSION=7
|
||||
PATCHLEVEL=1
|
||||
|
||||
CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
|
||||
-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
|
||||
-DINCLUDE_PATH=\"$(includedir)\"
|
||||
|
||||
OBJS=preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o\
|
||||
keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o
|
||||
|
||||
all: ecpg
|
||||
|
||||
ifdef SNPRINTF
|
||||
OBJS+=$(top_builddir)/src/backend/port/snprintf.o
|
||||
|
||||
$(top_builddir)/src/backend/port/snprintf.o:
|
||||
$(MAKE) -C $(top_builddir)/src/backend/port snprintf.o
|
||||
endif
|
||||
|
||||
|
||||
ecpg: $(OBJS)
|
||||
$(CC) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
$(srcdir)/preproc.c $(srcdir)/preproc.h: preproc.y
|
||||
$(YACC) -d $(YFLAGS) $<
|
||||
mv y.tab.c $(srcdir)/preproc.c
|
||||
mv y.tab.h $(srcdir)/preproc.h
|
||||
|
||||
$(srcdir)/pgc.c: pgc.l
|
||||
$(LEX) $(LFLAGS) $<
|
||||
mv lex.yy.c $@
|
||||
|
||||
install: all installdirs
|
||||
$(INSTALL_PROGRAM) ecpg$(X) $(bindir)
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(bindir)
|
||||
|
||||
uninstall:
|
||||
rm -f $(bindir)/ecpg$(X)
|
||||
|
||||
clean distclean:
|
||||
rm -f *.o ecpg$(X)
|
||||
# garbage from partial builds
|
||||
rm -f y.tab.c y.tab.h lex.yy.c
|
||||
# garbage from development
|
||||
@rm -f core a.out *~ *.output *.tab.c
|
||||
|
||||
# `make clean' does not remove preproc.c, preproc.h, or pgc.c since we
|
||||
# want to ship those files in the distribution for people with
|
||||
# inadequate tools.
|
||||
maintainer-clean: distclean
|
||||
rm -f $(srcdir)/preproc.c $(srcdir)/preproc.h $(srcdir)/pgc.c
|
||||
|
||||
|
||||
depend dep: preproc.c pgc.c
|
||||
$(CC) -MM $(CFLAGS) *.c >depend
|
||||
|
||||
ifeq (depend,$(wildcard depend))
|
||||
include depend
|
||||
endif
|
||||
@@ -1,55 +0,0 @@
|
||||
SRCDIR= ../../..
|
||||
include $(SRCDIR)/Makefile.global
|
||||
|
||||
MAJOR_VERSION=2
|
||||
MINOR_VERSION=7
|
||||
PATCHLEVEL=1
|
||||
|
||||
CFLAGS+=-I../include -DMAJOR_VERSION=$(MAJOR_VERSION) \
|
||||
-DMINOR_VERSION=$(MINOR_VERSION) -DPATCHLEVEL=$(PATCHLEVEL) \
|
||||
-DINCLUDE_PATH=\"$(HEADERDIR)\"
|
||||
|
||||
OBJS=preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o\
|
||||
keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o
|
||||
|
||||
all:: ecpg
|
||||
|
||||
ifneq (@SNPRINTF@,)
|
||||
OBJS+=$(SRCDIR)/backend/port/snprintf.o
|
||||
|
||||
$(SRCDIR)/backend/port/snprintf.o:
|
||||
$(MAKE) -C $(SRCDIR)/backend/port snprintf.o
|
||||
endif
|
||||
|
||||
# Rule that really do something.
|
||||
ecpg: $(OBJS)
|
||||
$(CC) -o ecpg $(OBJS) $(LEXLIB) $(LDFLAGS)
|
||||
|
||||
preproc.c preproc.h: preproc.y
|
||||
$(YACC) -d $(YFLAGS) $<
|
||||
mv y.tab.c preproc.c
|
||||
mv y.tab.h preproc.h
|
||||
|
||||
pgc.c: pgc.l
|
||||
$(LEX) $(LFLAGS) $<
|
||||
mv lex.yy.c pgc.c
|
||||
|
||||
clean:
|
||||
rm -f *.o core a.out ecpg$(X) *~ *.output *.tab.c
|
||||
# And the garbage that might have been left behind by partial build:
|
||||
rm -f y.tab.c y.tab.h lex.yy.c
|
||||
# make clean does not remove preproc.c, preproc.h, pgc.c since we want
|
||||
# to ship those files in the distribution, for people with inadequate tools.
|
||||
|
||||
install: all
|
||||
$(INSTALL) $(INSTL_EXE_OPTS) ecpg$(X) $(BINDIR)
|
||||
|
||||
uninstall:
|
||||
rm -f $(BINDIR)/ecpg
|
||||
|
||||
depend dep: preproc.c pgc.c
|
||||
$(CC) -MM $(CFLAGS) *.c >depend
|
||||
|
||||
ifeq (depend,$(wildcard depend))
|
||||
include depend
|
||||
endif
|
||||
@@ -12,7 +12,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.59 2000/06/14 18:17:54 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.60 2000/06/28 18:29:40 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -36,6 +36,8 @@
|
||||
#undef yywrap
|
||||
#endif /* yywrap */
|
||||
|
||||
#define YY_NO_UNPUT
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user