aboutsummaryrefslogtreecommitdiff
path: root/winsup/doc/Makefile.in
blob: cfe206d898dc59c770db3e6fbfc154a2d703fc6c (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# -*- Makefile -*- for winsup/doc
# Copyright (c) 1998-2000, 2001, 2002, 2004, 2005, 2006, 2008, 2009, 2010,
# 2013, 2014 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@

prefix:=@prefix@
datarootdir:=@datarootdir@
docdir = @docdir@
htmldir = @htmldir@
mandir = @mandir@
man1dir = $(mandir)/man1
man3dir = $(mandir)/man3
infodir:=@infodir@

override INSTALL:=@INSTALL@
override INSTALL_DATA:=@INSTALL_DATA@

MKDIRP:=$(INSTALL) -m 755 -d

CC:=@CC@
CC_FOR_TARGET:=@CC@

XMLTO:=xmlto --skip-validation --with-dblatex
DOCBOOK2XTEXI:=@DOCBOOK2XTEXI@ --xinclude --info --utf8trans-map=charmap

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

.SUFFIXES: .html .body

.html.body:
	$(srcdir)/bodysnatcher.pl $<

.PHONY: all clean install install-all install-pdf install-html install-man \
	info install-info

all: Makefile Makefile.dep \
	cygwin-ug-net/cygwin-ug-net.html \
	cygwin-ug-net/cygwin-ug-net-nochunks.html.gz \
	cygwin-api/cygwin-api.html \
	faq/faq.body faq/faq.html \
	cygwin-ug-net/cygwin-ug-net.pdf \
	cygwin-api/cygwin-api.pdf \
	utils2man.stamp \
	api2man.stamp \
	intro2man.stamp \
	cygwin-ug-net.info cygwin-api.info

Makefile: $(srcdir)/Makefile.in
	/bin/sh ./config.status

clean:
	rm -f Makefile.dep
	rm -f *.html *.html.gz
	rm -Rf cygwin-api cygwin-ug cygwin-ug-net faq
	rm -f *.1 utils2man.stamp
	rm -f *.3 api2man.stamp
	rm -f *.info* charmap

install: install-all

install-all: install-pdf install-html install-man install-info

install-pdf: cygwin-ug-net/cygwin-ug-net.pdf cygwin-api/cygwin-api.pdf
	@$(MKDIRP) $(DESTDIR)$(docdir)
	$(INSTALL_DATA) $^ $(DESTDIR)$(docdir)

install-html: cygwin-ug-net/cygwin-ug-net.html cygwin-api/cygwin-api.html
	@$(MKDIRP) $(DESTDIR)$(htmldir)/cygwin-ug-net
	$(INSTALL_DATA) cygwin-ug-net/*.html $(DESTDIR)$(htmldir)/cygwin-ug-net
	$(INSTALL_DATA) cygwin-ug-net/cygwin-ug-net.html $(DESTDIR)$(htmldir)/cygwin-ug-net/index.html
	@$(MKDIRP) $(DESTDIR)$(htmldir)/cygwin-api
	$(INSTALL_DATA) cygwin-api/*.html $(DESTDIR)$(htmldir)/cygwin-api
	$(INSTALL_DATA) cygwin-api/cygwin-api.html $(DESTDIR)$(htmldir)/cygwin-api/index.html

install-man: utils2man.stamp api2man.stamp intro2man.stamp
	@$(MKDIRP) $(DESTDIR)$(man1dir)
	$(INSTALL_DATA) *.1 $(DESTDIR)$(man1dir)
	@$(MKDIRP) $(DESTDIR)$(man3dir)
	$(INSTALL_DATA) *.3 $(DESTDIR)$(man3dir)

install-info: cygwin-ug-net.info cygwin-api.info
	$(MKDIRP) $(DESTDIR)$(infodir)
	$(INSTALL_DATA) *.info* $(DESTDIR)$(infodir)

cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : $(cygwin-ug-net_SOURCES) html.xsl
	-$(XMLTO) html-nochunks -m $(srcdir)/html.xsl $<
	-@$(MKDIRP) cygwin-ug-net
	-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_SOURCES) html.xsl
	-$(XMLTO) html -o cygwin-ug-net/ -m $(srcdir)/html.xsl $<

cygwin-ug-net/cygwin-ug-net.pdf : $(cygwin-ug-net_SOURCES) fo.xsl
	-$(XMLTO) pdf -o cygwin-ug-net/ -m $(srcdir)/fo.xsl $<

utils2man.stamp: $(cygwin-ug-net_SOURCES) man.xsl
	$(XMLTO) man -m ${srcdir}/man.xsl $<
	@touch $@

cygwin-ug-net.info: $(cygwin-ug-net_SOURCES) charmap
	-$(DOCBOOK2XTEXI) $(srcdir)/cygwin-ug-net.xml --string-param output-file=cygwin-ug-net

cygwin-api/cygwin-api.html : $(cygwin-api_SOURCES) html.xsl
	-$(XMLTO) html -o cygwin-api/ -m $(srcdir)/html.xsl $<

cygwin-api/cygwin-api.pdf : $(cygwin-api_SOURCES) fo.xsl
	-$(XMLTO) pdf -o cygwin-api/ -m $(srcdir)/fo.xsl $<

api2man.stamp: $(cygwin-api_SOURCES) man.xsl
	$(XMLTO) man -m ${srcdir}/man.xsl $<
	@touch $@

cygwin-api.info: $(cygwin-api_SOURCES) charmap
	-$(DOCBOOK2XTEXI) $(srcdir)/cygwin-api.xml --string-param output-file=cygwin-api

# this generates a custom charmap for docbook2x-texi which has a mapping for &reg;
charmap:
	cp /usr/share/docbook2X/charmaps/texi.charmap charmap
	echo "ae (R)" >>charmap

intro2man.stamp: intro.xml man.xsl
	-$(XMLTO) man -m ${srcdir}/man.xsl $<
	@echo ".so intro.1" >cygwin.1
	@touch $@

faq/faq.html : $(faq_SOURCES)
	-$(XMLTO) html -o faq -m $(srcdir)/html.xsl $(srcdir)/faq.xml
	-sed -i 's;<a name="id[mp][0-9]*"></a>;;g' faq/faq.html

Makefile.dep: cygwin-ug-net.xml cygwin-api.xml faq.xml
	cd $(srcdir) && ./xidepend $^ > "${CURDIR}/$@"