diff options
| author | Peter Eisentraut <peter_e@gmx.net> | 2000-06-27 00:32:06 +0000 |
|---|---|---|
| committer | Peter Eisentraut <peter_e@gmx.net> | 2000-06-27 00:32:06 +0000 |
| commit | 5bb8b62983799c8bb5ef2e578629dbd2705bbd52 (patch) | |
| tree | 75199eec2bcf58ab455f7adab52285580d97e4be /src/bin/pgtclsh | |
| parent | ecef326850ab087d78f217f8d97008d3974cbd76 (diff) | |
| download | postgresql-5bb8b62983799c8bb5ef2e578629dbd2705bbd52.tar.gz | |
Makefile cleanup for bin and pl subtrees. They should now support
all the standard semantics. Also get rid of Makefile.in's on the
way and instead declare all variables in Makefile.global.
Diffstat (limited to 'src/bin/pgtclsh')
| -rw-r--r-- | src/bin/pgtclsh/Makefile | 54 |
1 files changed, 33 insertions, 21 deletions
diff --git a/src/bin/pgtclsh/Makefile b/src/bin/pgtclsh/Makefile index 95f3a3b6a6..0aeb56a734 100644 --- a/src/bin/pgtclsh/Makefile +++ b/src/bin/pgtclsh/Makefile @@ -1,17 +1,16 @@ #------------------------------------------------------------------------- # -# Makefile -# Makefile for a tclsh workalike with pgtcl commands installed +# Makefile for src/bin/pgtclsh +# (a tclsh workalike with pgtcl commands installed) # # Copyright (c) 1994, Regents of the University of California # -# -# IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.27 2000/06/17 00:09:47 petere Exp $ +# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.28 2000/06/27 00:31:40 petere Exp $ # #------------------------------------------------------------------------- -SRCDIR= ../.. +subdir = src/bin/pgtclsh +top_builddir = ../../.. include ../../Makefile.global # @@ -26,42 +25,55 @@ CFLAGS+= $(X_CFLAGS) -I$(LIBPGTCLDIR) # If we are here then TCL is available -PGMS = pgtclsh -INSTPGMS = install_tcl +PROGRAMS = pgtclsh # Add TK targets if TK is available ifeq ($(USE_TK), true) -PGMS += pgtksh -INSTPGMS += install_tk +PROGRAMS += pgtksh endif -all: $(PGMS) +all: submake $(PROGRAMS) pgtclsh: pgtclAppInit.o - $(CC) $(CFLAGS) $(TCL_DEFS) -o $@ pgtclAppInit.o \ + $(CC) $(CFLAGS) $(TCL_DEFS) -o $@ $< \ $(LIBPGTCL) $(LIBPQ) $(TCL_LIB_SPEC) $(TCL_LIBS) $(LDFLAGS) pgtksh: pgtkAppInit.o - $(CC) $(CFLAGS) $(TK_DEFS) -o $@ pgtkAppInit.o \ + $(CC) $(CFLAGS) $(TK_DEFS) -o $@ $< \ $(LIBPGTCL) $(LIBPQ) $(X_LIBS) $(TK_LIB_SPEC) $(TK_LIBS) \ $(TCL_LIB_SPEC) $(X11_LIBS) $(LDFLAGS) -install: $(INSTPGMS) +.PHONY: submake +submake: + $(MAKE) -C $(LIBPGTCLDIR) all + +install: all installdirs + $(INSTALL_PROGRAM) pgtclsh $(bindir)/pgtclsh +ifeq ($(USE_TK), true) + $(INSTALL_PROGRAM) pgtksh $(bindir)/pgtksh +endif -install_tcl: pgtclsh - $(INSTALL) $(INSTL_EXE_OPTS) pgtclsh $(BINDIR)/pgtclsh +installdirs: + $(mkinstalldirs) $(bindir) -install_tk: pgtksh - $(INSTALL) $(INSTL_EXE_OPTS) pgtksh $(BINDIR)/pgtksh +uninstall: + rm -f $(bindir)/pgtclsh $(bindir)/pgtksh Makefile.tcldefs: mkMakefile.tcldefs.sh - /bin/sh ./mkMakefile.tcldefs.sh + $(SHELL) $< Makefile.tkdefs: mkMakefile.tkdefs.sh - /bin/sh ./mkMakefile.tkdefs.sh + $(SHELL) $< + +mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh: $(top_builddir)/config.status +mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh: % : %.in + cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status clean: - rm -f *.o Makefile.t*defs pgtclsh pgtksh + rm -f *.o Makefile.tcldefs Makefile.tkdefs pgtclsh pgtksh + +distclean maintainer-clean: clean + rm -f mkMakefile.tcldefs.sh mkMakefile.tkdefs.sh dep depend: $(CC) -MM $(CFLAGS) *.c > depend |
