diff options
| author | Peter Eisentraut | 2002-07-27 20:10:05 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2002-07-27 20:10:05 +0000 |
| commit | b0c3c48eb3779d9637a03c455f3934d9d7c08030 (patch) | |
| tree | 4fbf5c8d94ae2534735e1b7935edb40d6205cc44 /src/bin | |
| parent | c3fdf8925ed7fbb3017be052e0700c51ceb12e0b (diff) | |
Assemble portability modules into libpgport library.
Some makefile simplifications.
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/pg_dump/Makefile | 18 | ||||
| -rw-r--r-- | src/bin/pg_encoding/Makefile | 23 | ||||
| -rw-r--r-- | src/bin/psql/Makefile | 21 |
3 files changed, 8 insertions, 54 deletions
diff --git a/src/bin/pg_dump/Makefile b/src/bin/pg_dump/Makefile index 1a19c71fc26..eff79981866 100644 --- a/src/bin/pg_dump/Makefile +++ b/src/bin/pg_dump/Makefile @@ -5,7 +5,7 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.35 2002/07/15 21:34:05 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.36 2002/07/27 20:10:05 petere Exp $ # #------------------------------------------------------------------------- @@ -14,12 +14,11 @@ top_builddir = ../../.. include $(top_builddir)/src/Makefile.global OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \ - pg_backup_files.o pg_backup_null.o pg_backup_tar.o sprompt.o \ - $(STRDUP) $(STRTOUL) + pg_backup_files.o pg_backup_null.o pg_backup_tar.o sprompt.o override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) -all: submake pg_dump pg_restore pg_dumpall +all: submake-libpq submake-libpgport pg_dump pg_restore pg_dumpall pg_dump: pg_dump.o common.o $(OBJS) $(libpq_builddir)/libpq.a $(CC) $(CFLAGS) pg_dump.o common.o $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@ @@ -34,10 +33,6 @@ pg_dumpall: pg_dumpall.sh $< >$@ chmod a+x $@ -.PHONY: submake -submake: - $(MAKE) -C $(libpq_builddir) all - install: all installdirs $(INSTALL_PROGRAM) pg_dump$(X) $(DESTDIR)$(bindir)/pg_dump$(X) $(INSTALL_PROGRAM) pg_restore$(X) $(DESTDIR)$(bindir)/pg_restore$(X) @@ -49,12 +44,5 @@ installdirs: uninstall: rm -f $(addprefix $(DESTDIR)$(bindir)/, pg_dump$(X) pg_restore$(X) pg_dumpall) -depend dep: - $(CC) -MM $(CFLAGS) *.c >depend - clean distclean maintainer-clean: rm -f pg_dump$(X) pg_restore$(X) $(OBJS) pg_dump.o common.o pg_restore.o pg_dumpall - -ifeq (depend,$(wildcard depend)) -include depend -endif diff --git a/src/bin/pg_encoding/Makefile b/src/bin/pg_encoding/Makefile index 94d3e08c5ae..a4ca9bb3a29 100644 --- a/src/bin/pg_encoding/Makefile +++ b/src/bin/pg_encoding/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1998, PostgreSQL Global Development Group # -# $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.14 2001/03/23 05:46:05 ishii Exp $ +# $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.15 2002/07/27 20:10:05 petere Exp $ # #------------------------------------------------------------------------- @@ -14,23 +14,11 @@ include $(top_builddir)/src/Makefile.global OBJS= pg_encoding.o -all: submake pg_encoding - -ifdef STRTOUL -OBJS+=$(top_builddir)/src/backend/port/strtoul.o - -$(top_builddir)/src/backend/port/strtoul.o: - $(MAKE) -C $(top_builddir)/src/backend/port strtoul.o -endif +all: submake-libpq submake-libpgport pg_encoding pg_encoding: $(OBJS) $(CC) $(CFLAGS) $^ $(libpq) $(LDFLAGS) $(LIBS) -o $@ -.PHONY: submake - -submake: - $(MAKE) -C $(libpq_builddir) all - install: all installdirs $(INSTALL_PROGRAM) pg_encoding$(X) $(DESTDIR)$(bindir)/pg_encoding$(X) @@ -40,12 +28,5 @@ installdirs: uninstall: rm -f $(DESTDIR)$(bindir)/pg_encoding$(X) -depend dep: - $(CC) -MM $(CFLAGS) *.c >depend - clean distclean maintainer-clean: rm -f pg_encoding$(X) pg_encoding.o - -ifeq (depend,$(wildcard depend)) -include depend -endif diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile index 5baa463bbc1..dbaa5836b48 100644 --- a/src/bin/psql/Makefile +++ b/src/bin/psql/Makefile @@ -5,7 +5,7 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.34 2002/07/15 21:34:05 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.35 2002/07/27 20:10:05 petere Exp $ # #------------------------------------------------------------------------- @@ -19,12 +19,9 @@ override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) OBJS=command.o common.o help.o input.o stringutils.o mainloop.o copy.o \ startup.o prompt.o variables.o large_obj.o print.o describe.o \ - sprompt.o tab-complete.o mbprint.o $(SNPRINTF) $(STRDUP) \ - $(STRERROR) $(STRTOUL) + sprompt.o tab-complete.o mbprint.o -all: submake psql - -# End of hacks for picking up backend 'port' modules +all: submake-libpq submake-libpgport psql psql: $(OBJS) $(libpq_builddir)/libpq.a $(CC) $(CFLAGS) $(OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@ @@ -39,11 +36,6 @@ $(srcdir)/sql_help.h: @echo "*** Perl is needed to build psql help." endif -.PHONY: submake - -submake: - $(MAKE) -C $(libpq_builddir) all - distprep: $(srcdir)/sql_help.h install: all installdirs @@ -55,15 +47,8 @@ installdirs: uninstall: rm -f $(DESTDIR)$(bindir)/psql$(X) -depend dep: - $(CC) -MM -MG $(CFLAGS) *.c >depend - clean distclean: rm -f psql$(X) $(OBJS) maintainer-clean: distclean rm -f $(srcdir)/sql_help.h - -ifeq (depend,$(wildcard depend)) -include depend -endif |
