]> granicus.if.org Git - postgresql/blob - doc/Makefile
Another round of those unportable config/build changes :-/
[postgresql] / doc / Makefile
1 #----------------------------------------------------------------------------
2 #
3 # Makefile
4 #       Postgres documentation installation makefile
5 #       Thomas Lockhart
6 #
7 # Copyright (c) 1994, Regents of the University of California
8 #
9 #
10 # IDENTIFICATION
11 #    $Header: /cvsroot/pgsql/doc/Makefile,v 1.16 2000/07/09 13:13:55 petere Exp $
12 #
13 #----------------------------------------------------------------------------
14
15 PGDOCS= $(POSTGRESDIR)/doc
16 SRCDIR= ../src
17
18 TAR= tar
19
20 # Pick up Makefile.global from the source area
21 # This is the only resource from the code source area and is optional.
22 # Actually, we want this to get Makefile.custom - thomas 1998-03-01
23
24 ifneq ($(wildcard $(SRCDIR)/Makefile.global), )
25 include $(SRCDIR)/Makefile.global
26 endif
27
28 # Hmm, made this optional but jade _really_ doesn't like them missing
29 # - thomas 1998-03-01
30 ifneq ($(HDSL), )
31 HTMLOPTS= -d $(HDSL)
32 endif
33 ifneq ($(PDSL), )
34 PRINTOPTS= -d $(PDSL)
35 endif
36
37 MODULES= admin postgres programmer tutorial user
38 TARGETS= $(MODULES:%=%.html)
39
40 .PRECIOUS: postgres.tex postgres.dvi
41 .PHONY: beforeinstall install all clean distclean
42
43 beforeinstall::
44         -@if [ ! -d $(PGDOCS) ]; then mkdir $(PGDOCS); fi
45
46 install::
47         $(MAKE) all
48         $(MAKE) man
49
50 all:: beforeinstall $(MODULES)
51
52 clean::
53         rm -rf $(MODULES)
54
55 distclean::
56         $(MAKE) clean
57
58 man::
59         -@if test ! -d $(POSTMANDIR) ; then mkdir $(POSTMANDIR) ; fi
60         gunzip -c man.tar.gz | (cd $(POSTMANDIR) ; $(TAR) xf - )
61
62 #
63 # Generic production rules
64 #
65
66 # Unpack tar file
67 # Put into area pointed to by $(PGDOCS).
68 ## Make a local file to keep track of dependencies,
69 ##  if $(PGDOCS) points somewhere else.
70 ## Disable this for now - thomas 1998-03-01
71 # Remove the contents of the target directory
72 #  to replace symlinks - thomas 1998-03-01
73
74 %:      %.tar.gz
75         rm -rf ./$@ $(PGDOCS)/$*
76         if test ! -d $(PGDOCS)/$* ; then mkdir $(PGDOCS)/$* ; fi
77         gunzip -c $< | (cd $(PGDOCS)/$* ; $(TAR) xf - )
78 #       touch ./$*