Added Jon Griffiths.
[wine] / documentation / Makefile.in
1 TOPSRCDIR = @top_srcdir@
2 TOPOBJDIR = ..
3 SRCDIR    = @srcdir@
4 VPATH     = @srcdir@
5 MODULE    = none
6 BOOKNAME  = wine-doc
7 DB2HTML   = @DB2HTML@
8 DB2PDF    = @DB2PDF@
9 DB2PS     = @DB2PS@
10
11 EXTRASUBDIRS = samples status
12
13 WINE_USER_SRCS = \
14         bugs.sgml \
15         configuring.sgml \
16         fonts.sgml \
17         getting.sgml \
18         installing.sgml \
19         introduction.sgml \
20         printing.sgml \
21         registry.sgml \
22         running.sgml
23
24 WINE_DEVEL_SRCS = \
25         architecture.sgml \
26         build.sgml \
27         compiling.sgml \
28         consoles.sgml \
29         cvs-regression.sgml \
30         debugger.sgml \
31         debugging.sgml \
32         dlls.sgml \
33         documentation.sgml \
34         i18n.sgml \
35         implementation.sgml \
36         multimedia.sgml \
37         ole.sgml \
38         opengl.sgml \
39         patches.sgml \
40         porting.sgml \
41         testing.sgml \
42         tools.sgml
43
44 WINELIB_USER_SRCS = \
45         winelib-bindlls.sgml \
46         winelib-intro.sgml \
47         winelib-mfc.sgml \
48         winelib-pkg.sgml \
49         winelib-porting.sgml \
50         winelib-toolkit.sgml
51
52 WINE_PKG_SRCS = \
53         packaging.sgml
54
55 WINE_FAQ_SRCS = \
56         faq.sgml
57
58 WINE_DOC_SRCS = \
59         $(WINELIB_USER_SRCS) \
60         $(WINE_DEVEL_SRCS) \
61         $(WINE_FAQ_SRCS) \
62         $(WINE_PKG_SRCS) \
63         $(WINE_USER_SRCS)
64
65 MAN_TARGETS = wine.man
66
67 ALLBOOKS = \
68         wine-devel \
69         wine-faq \
70         wine-pkg \
71         wine-user \
72         winelib-user
73
74 BOOKS_TARGETS = \
75         $(ALLBOOKS:%=%/index.html) \
76         $(ALLBOOKS:%=%.pdf) \
77         $(ALLBOOKS:%=%.ps)
78
79 all: $(MAN_TARGETS)
80
81 @MAKE_RULES@
82
83 everything: $(MAN_TARGETS) $(BOOKS_TARGETS)
84 doc: $(BOOKS_TARGETS)
85 html: $(ALLBOOKS:%=%/index.html)
86 pdf: $(ALLBOOKS:%=%.pdf)
87 ps: $(ALLBOOKS:%=%.ps)
88
89 # this is the all-in-one book, not built by default
90 wine-doc: wine-doc/index.html wine-doc.pdf wine-doc.ps
91
92 .PHONY: everything doc html pdf ps wine-doc dist
93
94 .SUFFIXES: .sgml /index.html .pdf .ps
95
96 .sgml/index.html:
97         $(DB2HTML) -d $(SRCDIR)/default.dsl -o $* $<
98
99 .sgml.pdf:
100         $(DB2PDF) -d $(SRCDIR)/print.dsl $< >/dev/null
101
102 .sgml.ps:
103         $(DB2PS) $< >/dev/null
104
105 wine-devel.pdf wine-devel.ps wine-devel/index.html: $(WINE_DEVEL_SRCS)
106 wine-faq.pdf wine-faq.ps wine-faq/index.html: $(WINE_FAQ_SRCS)
107 wine-pkg.pdf wine-pkg.ps wine-pkg/index.html: $(WINE_PKG_SRCS)
108 wine-user.pdf wine-user.ps wine-user/index.html: $(WINE_USER_SRCS)
109 winelib-user.pdf winelib-user.ps winelib-user/index.html: $(WINELIB_USER_SRCS)
110 wine-doc.pdf wine-doc.ps wine-doc/index.html: $(WINE_DOC_SRCS)
111
112 wine.man: wine.man.in
113         sed -e 's,@bindir\@,$(bindir),g' -e 's,@dlldir\@,$(dlldir),g' -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' $(SRCDIR)/wine.man.in >$@ || $(RM) $@
114
115 # Rules for distribution tarballs of formatted docs
116
117 dist: wine-doc-ps.tar.gz wine-doc-pdf.tar.gz wine-doc-html.tar.gz wine-doc-txt.tar.gz
118
119 wine-doc-ps.tar.gz: $(ALLBOOKS:%=%.ps)
120         tar cf - $(ALLBOOKS:%=%.ps) | gzip -9 > $@ || $(RM) $@
121
122 wine-doc-pdf.tar.gz: $(ALLBOOKS:%=%.pdf)
123         tar cf - $(ALLBOOKS:%=%.pdf) | gzip -9 > $@ || $(RM) $@
124
125 wine-doc-html.tar.gz: $(ALLBOOKS:%=%/index.html)
126         tar cf - $(ALLBOOKS:%=%/*.html) | gzip -9 > $@ || $(RM) $@
127
128 wine-doc-txt.tar.gz: $(ALLBOOKS:%=%/index.html)
129         for i in $(ALLBOOKS:%=%/*.html); do w3m -dump $$i > `dirname $$i`/`basename $$i .html`.txt || exit 1; done
130         tar cf - $(ALLBOOKS:%=%/*.txt) | gzip -9 > $@ || $(RM) $@
131
132 install:: $(MAN_TARGETS)
133         $(MKINSTALLDIRS) $(mandir)/man$(prog_manext) $(mandir)/man$(conf_manext) $(mandir)/man$(api_manext)
134         $(INSTALL_DATA) wine.man $(mandir)/man$(prog_manext)/wine.$(prog_manext)
135         $(INSTALL_DATA) $(SRCDIR)/wine.conf.man $(mandir)/man$(conf_manext)/wine.conf.$(conf_manext)
136
137 uninstall::
138         $(RM) $(mandir)/man$(prog_manext)/wine.$(prog_manext)
139         $(RM) $(mandir)/man$(conf_manext)/wine.conf.$(conf_manext)
140
141 install-api-man::
142         for i in $(SRCDIR)/man$(api_manext)/*; do $(INSTALL_DATA) $$i $(mandir)/man$(api_manext); done
143
144 clean::
145         $(RM) *.aux *.dvi *.out *.pdf *.ps *.tex *.log wine-doc-*.tar.gz $(MAN_TARGETS)
146         $(RM) -r wine-doc $(ALLBOOKS) html api-guide man$(api_manext) *.junk DBTOHTML_OUTPUT_DIR*
147
148 ### Dependencies: