4
4
#
5
5
# Copyright (c) 1994, Regents of the University of California
6
6
#
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 $
8
8
#
9
9
# ----------------------------------------------------------------------------
10
10
@@ -23,9 +23,9 @@ top_builddir = ..
23
23
include $(top_builddir ) /src/Makefile.global
24
24
25
25
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
29
29
30
30
ifneq ($(wildcard $(srcdir ) /man.tar.gz) ,)
31
31
found_man := yes
36
36
37
37
38
38
install : 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 - )
44
41
endif
45
42
ifdef found_man
46
43
gzip -d -c man.tar.gz | ( cd $(DESTDIR)$(mandir) && $(TAR) xf - )
47
44
endif
48
45
49
46
50
47
installdirs :
51
- $(mkinstalldirs ) $(DESTDIR )$(mandir ) $(addprefix $( DESTDIR )$(docdir ) /, . $( found_MODULES ) )
48
+ $(mkinstalldirs ) $(DESTDIR )$(mandir ) $(DESTDIR )$(docdir ) /html
52
49
53
50
54
51
uninstall :
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
56
55
ifdef 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 -))
58
57
endif
0 commit comments