aboutsummaryrefslogtreecommitdiff
path: root/winsup/doc/Makefile.in
blob: 5ef5d3416cf99bcea8586cf128aa024b9070e619 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# -*- Makefile -*- for winsup/doc
# Copyright (c) 1998-2000, 2001, 2002, 2004, 2005, 2006, 2008, 2009, 2010,
# 2013 Red Hat, Inc.
#
# This file is part of Cygwin.
#
# This software is a copyrighted work licensed under the terms of the
# Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
# details.

SHELL = @SHELL@
srcdir = @srcdir@
VPATH = @srcdir@

SGMLDIRS =  -d $(srcdir) -d $(srcdir)/../utils -d $(srcdir)/../cygwin

CC:=@CC@
CC_FOR_TARGET:=@CC@
exeext:=@build_exeext@

XMLTO:=xmlto --skip-validation --with-dblatex

include $(srcdir)/../Makefile.common

TOCLEAN:=faq.txt ./*.html readme.txt doctool.o doctool.exe *.junk \
	 cygwin-ug.sgml cygwin-ug cygwin-ug-net.html.gz \
	 cygwin-ug-net.sgml cygwin-ug-net cygwin-ug-net.html \
	 cygwin-api.sgml cygwin-api cygwin-api-int.sgml cygwin-api-int \
	 faq

FAQ_SOURCES:= faq-api.xml faq-programming.xml faq-resources.xml \
	      faq-sections.xml faq-setup.xml faq-using.xml faq-what.xml faq.xml

.SUFFIXES:

all : \
	cygwin-ug-net/cygwin-ug-net.html \
	cygwin-ug-net/cygwin-ug-net-nochunks.html.gz \
	cygwin-api/cygwin-api.html \
	faq/faq.html faq/faq-nochunks.html \
	cygwin-ug-net/cygwin-ug-net.pdf \
	cygwin-api/cygwin-api.pdf

clean:
	rm -Rf $(TOCLEAN)

install:	all

cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : cygwin-ug-net.sgml doctool
	-${XMLTO} html-nochunks -m $(srcdir)/cygwin.dsl $<
	-cp cygwin-ug-net.html cygwin-ug-net/cygwin-ug-net-nochunks.html
	-rm -f cygwin-ug-net/cygwin-ug-net-nochunks.html.gz
	-gzip cygwin-ug-net/cygwin-ug-net-nochunks.html

cygwin-ug-net/cygwin-ug-net.html : cygwin-ug-net.sgml doctool
	-${XMLTO} html -o cygwin-ug-net/ -m $(srcdir)/cygwin.dsl $<

# Some versions of jw hang with the -o option
cygwin-ug-net/cygwin-ug-net.pdf : cygwin-ug-net.sgml
	-${XMLTO} pdf -o cygwin-ug-net/ $<

cygwin-ug-net.sgml : cygwin-ug-net.in.sgml ./doctool Makefile
	-./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $<

cygwin-api/cygwin-api.html : cygwin-api.sgml
	-${XMLTO} html -o cygwin-api/ -m $(srcdir)/cygwin.dsl $<

cygwin-api/cygwin-api.pdf : cygwin-api.sgml
	-${XMLTO} pdf -o cygwin-api/ $<

cygwin-api.sgml : cygwin-api.in.sgml ./doctool Makefile
	-./doctool -m $(SGMLDIRS) -s $(srcdir) -o $@ $<

faq/faq.html : $(FAQ_SOURCES)
	-${XMLTO} html -o faq -m $(srcdir)/cygwin.dsl $(srcdir)/faq-sections.xml
	-sed -i 's;</a><a name="id[0-9]*"></a>;</a>;g' faq/faq.*.html

faq/faq-nochunks.html : $(FAQ_SOURCES)
	-${XMLTO} html -o faq -m $(srcdir)/cygwin.dsl $(srcdir)/faq.xml
	-sed -i 's;</a><a name="id[0-9]*"></a>;</a>;g' faq/faq-nochunks.html

./doctool : doctool.c
	gcc -g $< -o $@

TBFILES = cygwin-ug-net.dvi cygwin-ug-net.rtf cygwin-ug-net.ps \
	  cygwin-ug-net.pdf cygwin-ug-net.sgml \
	  cygwin-api.dvi cygwin-api.rtf cygwin-api.ps \
	  cygwin-api.pdf cygwin-api.sgml
TBDIRS = cygwin-ug-net cygwin-api
TBDEPS = cygwin-ug-net/cygwin-ug-net.html cygwin-api/cygwin-api.html

tarball : cygwin-docs.tar.bz2
cygwin-docs.tar.bz2 : $(TBFILES) $(TBDEPS)
	find $(TBFILES) $(TBDIRS) \! -type d | sort | tar -T - -cf -  | bzip2 > cygwin-docs.tar.bz2