2003-03-23 23:26:55 +00:00
#
2003-06-18 17:37:36 +00:00
# Makefile.inc for Makefiles in subdirectories.
2003-03-23 23:26:55 +00:00
#
2003-10-21 11:07:02 +00:00
# Use customized html-chunk.xsl and/or html-single.xsl file if they exist...
2003-10-20 09:56:48 +00:00
# Also add html-common.xsl to depends if it exists.
ifeq ( html - chunk . xsl , $ ( wildcard html - chunk . xsl ))
HTML_CHUNK_XSL := html - chunk . xsl
ifeq ( html - common . xsl , $ ( wildcard html - common . xsl ))
CHUNK_XSL_DEPS := $ ( HTML_CHUNK_XSL ) html - common . xsl ../ html - chunk . xsl ../ html - common . xsl
else
CHUNK_XSL_DEPS := $ ( HTML_CHUNK_XSL ) ../ html - chunk . xsl ../ html - common . xsl
endif
else
HTML_CHUNK_XSL := ../ html - chunk . xsl
CHUNK_XSL_DEPS := $ ( HTML_CHUNK_XSL ) ../ html - common . xsl
endif
2003-10-21 11:07:02 +00:00
ifeq ( html - single . xsl , $ ( wildcard html - single . xsl ))
HTML_SINGLE_XSL := html - single . xsl
ifeq ( html - common . xsl , $ ( wildcard html - common . xsl ))
XSL_DEPS := $ ( HTML_SINGLE_XSL ) html - common . xsl ../ html - single . xsl ../ html - common . xsl
else
XSL_DEPS := $ ( HTML_SINGLE_XSL ) html - common . xsl ../ html - single . xsl ../ html - common . xsl
endif
else
HTML_SINGLE_XSL := ../ html - single . xsl
XSL_DEPS := $ ( HTML_SINGLE_XSL ) ../ html - common . xsl
endif
2003-06-18 17:37:36 +00:00
# Fall back to the default HTML stylesheet if none is specified.
2003-03-23 23:26:55 +00:00
HTML_STYLESHEET ? = ../ default . css
# This is the main target...
2003-10-21 11:07:02 +00:00
all : html - chunked html - single
2003-10-20 09:56:48 +00:00
html - chunked : $ ( HTMLDIR ) / index . html
2003-10-21 11:07:02 +00:00
html - single : $ ( HTMLFILE )
2003-10-20 09:56:48 +00:00
$ ( HTMLDIR ) / index . html : documentation . xml $ ( CHUNK_XSL_DEPS )
2003-09-21 13:10:58 +00:00
@ if test " $ (HTMLDIR) " = " " ; then echo " Error: HTMLDIR not set!!! " ; echo " Typically this means, that you've run make from subdir of DOCS/xml. Don't do this! " ; false ; fi
2003-10-08 02:00:59 +00:00
if test " $ (USE_SYMLINKS) " = " yes " ; then for file in ../ en /*. xml ; do if ! test - r `basename $$file` ; then ln - s $$file `basename $$file` ; fi ; done ; fi
2003-03-23 23:26:55 +00:00
- rm - f $ ( HTMLDIR ) /*
2003-06-18 17:37:36 +00:00
../ xmllint . sh $ <
2003-03-23 23:26:55 +00:00
cp $ ( HTML_STYLESHEET ) $ ( HTMLDIR ) /
2003-10-20 09:56:48 +00:00
../ xsltproc . sh $ ( HTMLDIR ) / $ ( HTML_CHUNK_XSL ) $ <
$ ( HTMLFILE ) : documentation . xml $ ( XSL_DEPS )
@ if test " $ (HTMLFILE) " = " " ; then echo " Error: HTMLFILE not set!!! " ; echo " Typically this means, that you've run make from subdir of DOCS/xml. Don't do this! " ; false ; fi
if test " $ (USE_SYMLINKS) " = " yes " ; then for file in ../ en /*. xml ; do if ! test - r `basename $$file` ; then ln - s $$file `basename $$file` ; fi ; done ; fi
- rm - f $ ( HTMLFILE )
../ xmllint . sh $ <
cp - f $ ( HTML_STYLESHEET ) `dirname $(HTMLFILE)`
2003-10-21 11:07:02 +00:00
../ xsltproc . sh $ ( HTMLFILE ) $ ( HTML_SINGLE_XSL ) $ <
2003-03-23 23:26:55 +00:00
2003-10-21 11:07:02 +00:00
../ html - single . xsl :
2003-06-18 17:37:36 +00:00
cd .. && sh configure
2003-10-08 02:00:59 +00:00
distclean :
if test " $ (USE_SYMLINKS) " = " yes " ; then for file in *. xml ; do if test - L $$file && test " `readlink $ $file ` " = " ../en/ $ $file " ; then rm $$file ; fi ; done ; fi