]> granicus.if.org Git - postgresql/blob - doc/Makefile
baa809d797af0e1f21ea79672476c20fc82cc824
[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.12 1998/11/29 05:30:13 tgl Exp $
12 #
13 #----------------------------------------------------------------------------
14
15 PGDOCS= $(POSTGRESDIR)/doc
16 SRCDIR= ../src
17
18 TAR= tar
19 GZCAT= zcat
20
21 # Pick up Makefile.global from the source area
22 # This is the only resource from the code source area and is optional.
23 # Actually, we want this to get Makefile.custom - thomas 1998-03-01
24
25 ifneq ($(wildcard $(SRCDIR)/Makefile.global), )
26 include $(SRCDIR)/Makefile.global
27 endif
28
29 # Hmm, made this optional but jade _really_ doesn't like them missing
30 # - thomas 1998-03-01
31 ifneq ($(HDSL), )
32 HTMLOPTS= -d $(HDSL)
33 endif
34 ifneq ($(PDSL), )
35 PRINTOPTS= -d $(PDSL)
36 endif
37
38 MODULES= admin postgres programmer tutorial user
39 TARGETS= $(MODULES:%=%.html)
40
41 .PRECIOUS: postgres.tex postgres.dvi
42 .PHONY: beforeinstall install all clean distclean
43
44 beforeinstall::
45         if [ ! -d $(PGDOCS) ]; then mkdir $(PGDOCS); fi
46
47 install::
48         $(MAKE) all
49         $(MAKE) man
50
51 all:: beforeinstall $(MODULES)
52
53 clean::
54         rm -rf $(MODULES)
55
56 distclean::
57         $(MAKE) clean
58
59 man::
60         $(MAKE) -C $(SRCDIR) install-man
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         $(GZCAT) $< | (cd $(PGDOCS)/$* ; $(TAR) xf - )
78 #       touch ./$*
79