4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-25 00:27:19 +08:00
newlib-cygwin/winsup/doc/Makefile.in
Jon Turney dc93f7ef2d
Cygwin: Remove recursive configure
There's doesn't seem to be much use in independently distributing these
subdirectories, so allowing them to be independently configured seems
pointless and overcomplicated.

The order in which the subdirectories are built is still a little odd,
as cygwin is linked with libcygserver, and cygserver is then linked with
cygwin. So, we build the cygwin directory first, which invokes a build
of libcygserver in the cygserver directory, and then build in the
cygserver directory to build the cygserver executable.

Drop AC_CONFIGURE_ARGS, since we don't need to recursively call
configure with the same arguments anymore.

Slightly refine when we build utils: Previously we didn't build any
utils if MinGW compiler use was avoided, now we just avoid building
those utils which require that compiler.

Greatly simplify how winsup_srcdir and target_builddir are set, since
we're only configuring from one directory.  (These are still kept
absolute, since we don't adjust them where used for being used in a
subdirectory).

Remove configure.cygwin and put it's (greatly reduced) contents inline
in the one place it's used now.

Remove generated configure and aclocal.m4 in subdirectories.
2020-11-20 15:56:11 +00:00

149 lines
4.7 KiB
Makefile

# -*- Makefile -*- for winsup/doc
#
# 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@
sysconfdir:=@sysconfdir@
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 install-etc
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
clean:
rm -f Makefile.dep
rm -f *.html *.html.gz
rm -Rf cygwin-api cygwin-ug cygwin-ug-net faq
rm -f api2man.stamp intro2man.stamp utils2man.stamp
rm -f *.1
rm -f *.3
rm -f *.info* charmap
install: install-all
install-all: install-pdf install-html install-man install-info install-etc
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
-(cd $(DESTDIR)$(htmldir)/cygwin-ug-net && ln -f cygwin-ug-net.html index.html)
$(INSTALL_DATA) $(srcdir)/docbook.css $(DESTDIR)$(htmldir)/cygwin-ug-net
@$(MKDIRP) $(DESTDIR)$(htmldir)/cygwin-api
$(INSTALL_DATA) cygwin-api/*.html $(DESTDIR)$(htmldir)/cygwin-api
-(cd $(DESTDIR)$(htmldir)/cygwin-api && ln -f cygwin-api.html index.html)
$(INSTALL_DATA) $(srcdir)/docbook.css $(DESTDIR)$(htmldir)/cygwin-api
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)
install-etc:
@$(MKDIRP) $(DESTDIR)$(sysconfdir)/postinstall
$(INSTALL) $(srcdir)/etc.postinstall.cygwin-doc.sh $(DESTDIR)$(sysconfdir)/postinstall/cygwin-doc.sh
@$(MKDIRP) $(DESTDIR)$(sysconfdir)/preremove
$(INSTALL) $(srcdir)/etc.preremove.cygwin-doc.sh $(DESTDIR)$(sysconfdir)/preremove/cygwin-doc.sh
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}/$@"