1
#################################################################################
1
################################################################################
2
2
# Makefile for the Kubuntu Documentation
3
# Copyright (C) 2005-2006 Ubuntu Documentation Project (ubuntu-doc@lists.ubuntu.com)
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
# On Debian based systems a copy of the GPL can be found
18
# at /usr/share/common-licenses/GPL
20
#################################################################################
4
# Copyright (C) 2009 Richard A. Johnson <nixternal@ubuntu.com>
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
16
# You should have received a copy of the GNU General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
19
################################################################################
24
23
# Language code for documents
25
# Ex. LN=ja for Japenese
29
27
XSLTPROC=/usr/bin/xsltproc
31
current_distro=$(shell test -e /etc/debian_version && echo "debian")
33
# NWalsh Docbook XSL's
34
ifeq ($(current_distro), debian)
36
NWDBXSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl
38
# Debian and Ubuntu also need an explicit location for the XML catalog files
39
#export XML_CATALOG_FILES = /usr/share/xml/docbook/schema/dtd/4.3/catalog.xml
42
#NWDBXSL=/usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl
45
# Stylesheets for building HTML and PDF
46
KUBUNTUXSL=libs/kubuntu-chunk.xsl
48
# Stylesheets for building docs for help.kubuntu.org
49
HKOXSL=libs/website/kubuntu-chunk.xsl
50
HKOINDEXXSL=libs/website/index-table.xsl
52
# Makes an Image list text file
53
#MKIMGLST=libs/imagelist.xsl
55
# Collected and Write Status
56
#wOS=../libs/writeOwnerStatus.xsl
58
# Base kde directories for output from processor
30
CHUNKXSL=libs/kubuntu-chunk.xsl
31
NONCHUNKXSL=libs/kubuntu-nonchunk.xsl
32
CHUNKONLINEXSL=libs/kubuntu-chunk-online.xsl
34
# Output/build directory
36
KBASE=$(BUILD)/kubuntu
64
mkdir -p $(KBASE)images/C
65
cp images/C/* $(KBASE)images/C/
67
# all is for the kubuntu package and for the nightly builds for doc.ubuntu.com
68
all: clean style about contributors copyright
70
for doc in `cat libs/shipped-docs`; do \
71
xsltproc --xinclude -o $(KBASE)$$doc/$(LN)/index.html $(KUBUNTUXSL) \
72
docs/$$doc/$(LN)/$$doc.xml; done
74
# About Kubuntu - Used for the desktop on a LiveCD only
75
## --stringparam generate.toc "no" removes the table of contents from the page
76
## --param chunk.first.sections 0 makes this build as 1 page
79
xsltproc --stringparam generate.toc "no" --param chunk.first.sections 0 \
80
--xinclude -o $(KBASE)about-kubuntu/C/index.html $(KUBUNTUXSL) \
81
docs/about-kubuntu/C/about-kubuntu.xml
85
xsltproc -o $(KBASE)libs/C/contributors.html $(KUBUNTUXSL) libs/C/contributors.xml
89
xsltproc -o $(KBASE)libs/C/copyright.html $(KUBUNTUXSL) libs/C/ccbysa.xml
45
mkdir -p $(KBASE)/images
46
mkdir -p $(KBASE)/common
47
cp images/* $(KBASE)/images/
48
cp libs/kubuntu.css $(KBASE)/common/
50
# All Kubuntu Documentation
51
all: common style desktopfiles
53
for doc in `ls docs/`; do \
54
xsltproc -o $(KBASE)/docs/$$doc/$(LN)/index.html $(CHUNKXSL) \
55
docs/$$doc/$(LN)/$$doc.xml; done
57
# Common - ccbysa and contributors
60
mkdir -p $(KBASE)/docs
61
xsltproc -o $(KBASE)/docs/contributors.html $(NONCHUNKXSL) \
62
common/contributors.xml
63
xsltproc -o $(KBASE)/docs/license.html $(NONCHUNKXSL) \
67
mkdir -p $(KBASE)/data
68
intltool-merge -d data/about/po/ data/about/about.desktop.in build/kubuntu/data/about.desktop
69
cp build/kubuntu/data/about.desktop build/kubuntu/data/about.desktop.tobemoved
70
intltool-merge -d data/directory/po/ data/directory/directory.desktop.in build/kubuntu/data/.directory
71
intltool-merge -d data/kubuntu-docs/po/ data/kubuntu-docs/kubuntu-docs.desktop.in build/kubuntu/data/kubuntu-docs.desktop
72
intltool-merge -d data/welcome/po/ data/welcome/welcome.desktop.in build/kubuntu/data/a_welcome.desktop
74
# Web - build docs for use on the web
77
cp -r /usr/share/doc/kde4/HTML/en/common/* $(KBASE)/common/
78
for doc in `ls docs/`; do \
79
cp docs/$$doc/$(LN)/$$doc.xml docs/$$doc/$(LN)/$$doc.xml.orig; \
80
sed -i 's/help\:\/kubuntu\//\.\.\/\.\.\//g' docs/$$doc/$(LN)/$$doc.xml; \
81
xsltproc -o $(KBASE)/$$doc/$(LN)/index.html $(CHUNKONLINEXSL) \
82
docs/$$doc/$(LN)/$$doc.xml; \
83
mv docs/$$doc/$(LN)/$$doc.xml.orig docs/$$doc/$(LN)/$$doc.xml; done
85
# Clean the build directory