aec27578633fe578d9fdba9be063e249ac3a1611
[util-vserver.git] / doc / Makefile-files
1 ## $Id: Makefile-files,v 1.12 2005/03/19 01:59:47 ensc Exp $  -*- makefile -*-
2
3 ## Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
4 ##  
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option)
8 ## any later version.
9 ##  
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ## GNU General Public License for more details.
14 ##  
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 ##  
19
20 doc_old_doc =                   doc/intro.txt
21
22 XSLT_AMFLAGS =                  --stringparam confdir '$(sysconfdir)/vservers'
23 XSLTP_AMFLAGS =                 -param confdir '$(sysconfdir)/vservers'
24
25 doc_gen_DOCS =                  doc/configuration.html \
26                                 doc/compatibility.html
27
28 doc_configuration_SRCS =        doc/configuration.xml \
29                                 doc/configuration.xsd \
30                                 doc/configuration.dtd \
31                                 doc/configuration.css \
32                                 doc/configuration-xhtml.xsl
33
34 doc_compatibility_SRCS =        doc/compatibility.xml \
35                                 doc/compatibility.dtd \
36                                 doc/compatibility-xhtml.xsl
37
38 EXTRA_DIST +=                   $(doc_compatibility_SRCS) \
39                                 $(doc_configuration_SRCS) \
40                                 $(doc_old_doc) \
41                                 $(doc_gen_DOCS)
42
43 CLEANFILES +=                   doc/*.raw.html* doc/*.html.tmp
44
45 doc/configuration.html:         STYLESHEET=$(srcdir)/doc/configuration-xhtml.xsl
46 doc/configuration.html:         $(srcdir)/doc/configuration-xhtml.xsl
47
48 doc/compatibility.html:         STYLESHEET=$(srcdir)/doc/compatibility-xhtml.xsl
49 doc/compatibility.html:         $(srcdir)/doc/compatibility-xhtml.xsl
50
51 doc:                            doc_doc
52 doc_doc:                        $(doc_gen_DOCS)
53
54 if HAVE_XSLTP
55 CLEANFILES +=                   $(doc_gen_DOCS)
56 %.html:                         %.xml $(STYLESHEET)
57                                 @-rm -f '$@.tmp' '$@'
58                                 LANG=C $(XSLTP) $(XSLTP_AMFLAGS) -in '$<' -xsl $(STYLESHEET) -out '$@.tmp'
59                                 @mv -f '$@.tmp' '$@'
60 else !HAVE_XSLTP
61 if HAVE_XSLTPROC
62 CLEANFILES +=                   $(doc_gen_DOCS)
63 %.html:                         %.xml $(STYLESHEET)
64                                 @-rm -f '$@.tmp' '$@'
65                                 $(XSLTPROC) $(XSLT_FLAGS) $(XSLT_AMFLAGS) -o '$@.tmp' "$(STYLESHEET)" "$<"
66                                 @mv -f '$@.tmp' '$@'
67 endif  HAVE_XSLTPROC
68 endif !HAVE_XSLTP