d396a37c84
Use 'xmlto man' to make manpages for utils (docbook2x-man could also be used, but since we already use xmlto...) This will generate multiple .1 files as an output, but we don't know what they will be called, so use a timestamp file for build avoidance when the dependencies haven't changed. 2015-06-12 Jon Turney <jon.turney@dronecode.org.uk> * Makefile.in (install-man, utils2man.stamp): Add rules to build and install manpages for utils. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
111 lines
3.2 KiB
Makefile
111 lines
3.2 KiB
Makefile
# -*- 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
|
|
|
|
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
|
|
|
|
include $(srcdir)/../Makefile.common
|
|
-include Makefile.dep
|
|
|
|
FAQ_SOURCES:= $(wildcard $(srcdir)/faq*.xml)
|
|
|
|
.SUFFIXES: .html .body
|
|
|
|
.html.body:
|
|
$(srcdir)/bodysnatcher.pl $<
|
|
|
|
.PHONY: all clean install install-all install-pdf install-html install-man
|
|
|
|
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
|
|
|
|
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
|
|
|
|
install: install-all
|
|
|
|
install-all: install-pdf install-html install-man
|
|
|
|
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
|
|
@$(MKDIRP) $(DESTDIR)$(man1dir)
|
|
$(INSTALL_DATA) *.1 $(DESTDIR)$(man1dir)
|
|
|
|
cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : $(cygwin-ug-net_SOURCES) cygwin.xsl
|
|
-$(XMLTO) html-nochunks -m $(srcdir)/cygwin.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) cygwin.xsl
|
|
-$(XMLTO) html -o cygwin-ug-net/ -m $(srcdir)/cygwin.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)
|
|
$(XMLTO) man $<
|
|
@touch $@
|
|
|
|
cygwin-api/cygwin-api.html : $(cygwin-api_SOURCES) cygwin.xsl
|
|
-$(XMLTO) html -o cygwin-api/ -m $(srcdir)/cygwin.xsl $<
|
|
|
|
cygwin-api/cygwin-api.pdf : $(cygwin-api_SOURCES) fo.xsl
|
|
-$(XMLTO) pdf -o cygwin-api/ -m $(srcdir)/fo.xsl $<
|
|
|
|
faq/faq.html : $(FAQ_SOURCES)
|
|
-$(XMLTO) html -o faq -m $(srcdir)/cygwin.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
|
|
cd $(srcdir) && ./xidepend $^ > "${CURDIR}/$@"
|