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

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Richard A. Johnson
  • Date: 2010-03-26 16:56:23 UTC
  • Revision ID: james.westby@ubuntu.com-20100326165623-gfoyo6ytvqk6wzub
Tags: 10.04.1
* Initial release of rewritten documentation for Lucid. All docs are new.
* Removed debian/kubuntu-docs.links
* Cleaning up debian/rules
* Updated debian/copyright
* Added source format 3.0
* Changed the maintainer back to Ubuntu Documentation Project
* Bumped standards to 3.8.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.
8
 
#
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.
13
 
#
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
19
 
#
20
 
#################################################################################
 
3
#
 
4
# Copyright (C) 2009 Richard A. Johnson <nixternal@ubuntu.com>
 
5
#
 
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.
 
10
#
 
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.
 
15
#
 
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/>.
 
18
#
 
19
################################################################################
21
20
 
22
21
MAKECMD=make
23
22
 
24
23
# Language code for documents
25
 
# Ex. LN=ja for Japenese
26
24
LN=C
27
25
 
28
 
# XSL Processors
 
26
# XSL Processor
29
27
XSLTPROC=/usr/bin/xsltproc
30
28
 
31
 
current_distro=$(shell test -e /etc/debian_version && echo "debian")
32
 
 
33
 
# NWalsh Docbook XSL's
34
 
ifeq ($(current_distro), debian)
35
 
# Ubuntu
36
 
NWDBXSL=/usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl
37
 
 
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
40
 
#else
41
 
# SuSE
42
 
#NWDBXSL=/usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl
43
 
endif
44
 
 
45
 
# Stylesheets for building HTML and PDF
46
 
KUBUNTUXSL=libs/kubuntu-chunk.xsl
47
 
 
48
 
# Stylesheets for building docs for help.kubuntu.org
49
 
HKOXSL=libs/website/kubuntu-chunk.xsl
50
 
HKOINDEXXSL=libs/website/index-table.xsl
51
 
 
52
 
# Makes an Image list text file
53
 
#MKIMGLST=libs/imagelist.xsl
54
 
 
55
 
# Collected and Write Status
56
 
#wOS=../libs/writeOwnerStatus.xsl
57
 
 
58
 
# Base kde directories for output from processor
59
 
KBASE=build/kubuntu/
 
29
# Stylesheets
 
30
CHUNKXSL=libs/kubuntu-chunk.xsl
 
31
NONCHUNKXSL=libs/kubuntu-nonchunk.xsl
 
32
CHUNKONLINEXSL=libs/kubuntu-chunk-online.xsl
 
33
 
 
34
# Output/build directory
 
35
BUILD=build
 
36
KBASE=$(BUILD)/kubuntu
 
37
 
 
38
################
 
39
## Make Targets
 
40
################
60
41
 
61
42
# Style
62
43
style:
63
44
 
64
 
        mkdir -p $(KBASE)images/C
65
 
        cp images/C/* $(KBASE)images/C/
66
 
 
67
 
# all is for the kubuntu package and for the nightly builds for doc.ubuntu.com
68
 
all: clean style about contributors copyright
69
 
 
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
73
 
 
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
77
 
about:
78
 
 
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
82
 
 
83
 
contributors:
84
 
 
85
 
        xsltproc -o $(KBASE)libs/C/contributors.html $(KUBUNTUXSL) libs/C/contributors.xml
86
 
 
87
 
copyright:
88
 
 
89
 
        xsltproc -o $(KBASE)libs/C/copyright.html $(KUBUNTUXSL) libs/C/ccbysa.xml
90
 
 
91
 
# Cleanup
 
45
        mkdir -p $(KBASE)/images
 
46
        mkdir -p $(KBASE)/common
 
47
        cp images/* $(KBASE)/images/
 
48
        cp libs/kubuntu.css $(KBASE)/common/
 
49
 
 
50
# All Kubuntu Documentation
 
51
all: common style desktopfiles
 
52
 
 
53
        for doc in `ls docs/`; do \
 
54
            xsltproc -o $(KBASE)/docs/$$doc/$(LN)/index.html $(CHUNKXSL) \
 
55
            docs/$$doc/$(LN)/$$doc.xml; done
 
56
 
 
57
# Common - ccbysa and contributors
 
58
common: clean
 
59
 
 
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) \
 
64
            common/ccbysa.xml
 
65
 
 
66
desktopfiles:
 
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
 
73
 
 
74
# Web - build docs for use on the web
 
75
web: common style
 
76
 
 
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
 
84
 
 
85
# Clean the build directory
92
86
clean:
93
87
 
94
 
        rm -rf $(KBASE)*
 
88
        rm -rf $(BUILD)