merge with 0.30.213
[util-vserver.git] / doc / Makefile-files
1 ## $Id: Makefile-files 2338 2006-09-28 22:39:19Z dhozac $  -*- 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                                 doc/configuration-wiki.xsl
34
35 doc_compatibility_SRCS =        doc/compatibility.xml \
36                                 doc/compatibility.dtd \
37                                 doc/compatibility-xhtml.xsl
38
39 EXTRA_DIST +=                   $(doc_compatibility_SRCS) \
40                                 $(doc_configuration_SRCS) \
41                                 $(doc_old_doc) \
42                                 $(doc_gen_DOCS)
43
44 CLEANFILES +=                   doc/*.raw.html* doc/*.html.tmp
45
46 doc/configuration.html:         STYLESHEET=$(srcdir)/doc/configuration-xhtml.xsl
47 doc/configuration.html:         $(srcdir)/doc/configuration-xhtml.xsl
48
49 doc/compatibility.html:         STYLESHEET=$(srcdir)/doc/compatibility-xhtml.xsl
50 doc/compatibility.html:         $(srcdir)/doc/compatibility-xhtml.xsl
51
52 doc:                            doc_doc
53 doc_doc:                        $(doc_gen_DOCS)
54
55 if HAVE_XSLTP
56 CLEANFILES +=                   $(doc_gen_DOCS)
57 %.html:                         %.xml $(STYLESHEET)
58                                 @-rm -f '$@.tmp' '$@'
59                                 LANG=C $(XSLTP) $(XSLTP_AMFLAGS) -in '$<' -xsl $(STYLESHEET) -out '$@.tmp'
60                                 @mv -f '$@.tmp' '$@'
61 else !HAVE_XSLTP
62 if HAVE_XSLTPROC
63 CLEANFILES +=                   $(doc_gen_DOCS)
64 %.html:                         %.xml $(STYLESHEET)
65                                 @-rm -f '$@.tmp' '$@'
66                                 $(XSLTPROC) $(XSLT_FLAGS) $(XSLT_AMFLAGS) -o '$@.tmp' "$(STYLESHEET)" "$<"
67                                 @mv -f '$@.tmp' '$@'
68 endif  HAVE_XSLTPROC
69 endif !HAVE_XSLTP