44#
55# Copyright (c) 1994, Regents of the University of California
66#
7- # $Header: /cvsroot/pgsql/doc/Makefile,v 1.19 2000/09/17 13:02:28 petere Exp $
7+ # $Header: /cvsroot/pgsql/doc/Makefile,v 1.20 2000/12/26 20:47:07 petere Exp $
88#
99# ----------------------------------------------------------------------------
1010
@@ -23,9 +23,9 @@ top_builddir = ..
2323include $(top_builddir ) /src/Makefile.global
2424
2525
26- MODULES := admin postgres programmer tutorial user
27-
28- found_MODULES := $( foreach module, $( MODULES ) , $( shell test -f $( srcdir ) / $( module ) .tar.gz && echo $( module ) ) )
26+ ifneq ( $( wildcard $( srcdir ) / postgres.tar.gz) ,)
27+ found_html := yes
28+ endif
2929
3030ifneq ($(wildcard $(srcdir ) /man.tar.gz) ,)
3131found_man := yes
3636
3737
3838install : all installdirs
39- ifneq ($(strip $(found_MODULES ) ) ,)
40- for module in $(found_MODULES); do \
41- gzip -d -c $${module}.tar.gz | ( cd $(DESTDIR)$(docdir)/$$module && $(TAR) xf - ) || \
42- exit; \
43- done
39+ ifdef found_html
40+ gzip -d -c postgres.tar.gz | ( cd $(DESTDIR)$(docdir)/html && $(TAR) xf - )
4441endif
4542ifdef found_man
4643gzip -d -c man.tar.gz | ( cd $(DESTDIR)$(mandir) && $(TAR) xf - )
4744endif
4845
4946
5047installdirs :
51- $(mkinstalldirs ) $(DESTDIR )$(mandir ) $(addprefix $( DESTDIR )$(docdir ) /, . $( found_MODULES ) )
48+ $(mkinstalldirs ) $(DESTDIR )$(mandir ) $(DESTDIR )$(docdir ) /html
5249
5350
5451uninstall :
55- -rm -rf$(addprefix $(DESTDIR )$(docdir ) /,$(MODULES ) )
52+ ifdef found_html
53+ -rm -f $(addprefix $(DESTDIR)$(docdir)/html/, $(shell gunzip -c $(srcdir)/postgres.tar.gz | tar tf -))
54+ endif
5655ifdef found_man
57- -rm -f $(addprefix $(DESTDIR)$(mandir)/, $(shell gunzip -c man.tar.gz | tar tf -))
56+ -rm -f $(addprefix $(DESTDIR)$(mandir)/, $(shell gunzip -c$(srcdir)/ man.tar.gz | tar tf -))
5857endif