Makefile 1.64 KB
Newer Older
1 2
#-------------------------------------------------------------------------
#
3
# Makefile for src/bin/pgaccess
4
#
5 6
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
7
#
8
# $Header: /cvsroot/pgsql/src/bin/pgaccess/Attic/Makefile,v 1.16 2001/02/18 18:34:01 momjian Exp $
9 10 11
#
#-------------------------------------------------------------------------

12 13
subdir = src/bin/pgaccess
top_builddir = ../../..
14
include $(top_builddir)/src/Makefile.global
15 16

pgaccessdir = $(datadir)/pgaccess
17 18 19

all: pgaccess

20 21 22
pgaccess: pgaccess.sh $(top_builddir)/src/Makefile.global
	sed -e 's,@WISH@,$(WISH),g' \
	    -e 's,@PGACCESSHOME@,$(pgaccessdir),g' \
23 24
	    -e 's,@PGLIB@,$(libdir),g' \
	    -e 's,@DEF_PGPORT@,$(DEF_PGPORT),g' \
25 26
	  $< >$@
	chmod a+x $@
27 28

install: all installdirs
29
	$(INSTALL_SCRIPT) pgaccess $(DESTDIR)$(bindir)/pgaccess
30 31 32 33 34
	$(INSTALL_SCRIPT) $(srcdir)/main.tcl $(DESTDIR)$(pgaccessdir)
	for i in $(srcdir)/lib/*.tcl; do $(INSTALL_DATA) $$i $(DESTDIR)$(pgaccessdir)/lib || exit 1; done
	for i in $(srcdir)/lib/help/*.hlp; do $(INSTALL_DATA) $$i $(DESTDIR)$(pgaccessdir)/lib/help || exit 1; done
	for i in $(srcdir)/lib/languages/[a-z]*; do $(INSTALL_DATA) $$i $(DESTDIR)$(pgaccessdir)/lib/languages || exit 1; done
	for i in $(srcdir)/images/*.gif; do $(INSTALL_DATA) $$i $(DESTDIR)$(pgaccessdir)/images || exit 1; done
35 36

installdirs:
37
	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(pgaccessdir)/lib/help $(DESTDIR)$(pgaccessdir)/lib/languages $(DESTDIR)$(pgaccessdir)/images
38 39

uninstall:
40 41
	rm -f $(DESTDIR)$(bindir)/pgaccess
	rm -rf $(DESTDIR)$(pgaccessdir)
42 43

clean distclean maintainer-clean:
44
	rm -f pgaccess