~ubuntu-branches/ubuntu/precise/kubuntu-docs/precise-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#################################################################################
# Makefile for the Kubuntu Documentation
# Copyright (C) 2005-2006 Ubuntu Documentation Project (ubuntu-doc@lists.ubuntu.com)
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#    On Debian based systems a copy of the GPL can be found
#    at /usr/share/common-licenses/GPL
#
#################################################################################

MAKECMD=make

# Language code for documents
# Ex. LN=ja for Japenese
LN=C

# XSL Processors
XSLTPROC=/usr/bin/xsltproc

current_distro=$(shell test -e /etc/debian_version && echo "debian")

# NWalsh Docbook XSL's
ifeq ($(current_distro), debian)
# Ubuntu
NWDBXSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl

# Debian and Ubuntu also need an explicit location for the XML catalog files
#export XML_CATALOG_FILES = /usr/share/xml/docbook/schema/dtd/4.3/catalog.xml
#else
# SuSE
#NWDBXSL=/usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl
endif

# Stylesheets for building HTML and PDF
KUBUNTUXSL=libs/kubuntu-chunk.xsl

# Stylesheets for building docs for help.kubuntu.org
HKOXSL=libs/website/kubuntu-chunk.xsl
HKOINDEXXSL=libs/website/index-table.xsl

# Makes an Image list text file
#MKIMGLST=libs/imagelist.xsl

# Collected and Write Status
#wOS=../libs/writeOwnerStatus.xsl

# Base kde directories for output from processor
KBASE=build/kubuntu/

# Style
style:

	mkdir -p $(KBASE)images/C
	cp images/C/* $(KBASE)images/C/

# all is for the kubuntu package and for the nightly builds for doc.ubuntu.com
all: clean style about contributors copyright

	for doc in `cat libs/shipped-docs`; do \
		xsltproc --xinclude -o $(KBASE)$$doc/$(LN)/index.html $(KUBUNTUXSL) \
		docs/$$doc/$(LN)/$$doc.xml; done

# About Kubuntu - Used for the desktop on a LiveCD only
## --stringparam generate.toc "no" removes the table of contents from the page
## --param chunk.first.sections 0 makes this build as 1 page
about:

	xsltproc --stringparam generate.toc "no" --param chunk.first.sections 0 \
		--xinclude -o $(KBASE)about-kubuntu/C/index.html $(KUBUNTUXSL) \
		docs/about-kubuntu/C/about-kubuntu.xml

contributors:

	xsltproc -o $(KBASE)libs/C/contributors.html $(KUBUNTUXSL) libs/C/contributors.xml

copyright:

	xsltproc -o $(KBASE)libs/C/copyright.html $(KUBUNTUXSL) libs/C/ccbysa.xml

# Cleanup
clean:

	rm -rf $(KBASE)*