2 # :vim: filetype=make : -*- makefile; coding: utf-8; -*-
5 # Part of Bugs Everywhere, a distributed bug tracking system.
7 # Copyright (C) 2008-2011 Anton Batenev <abbat@abbat>
8 # Ben Finney <benf@cybersource.com.au>
9 # Eric Kow <eric.kow@gmail.com>
10 # Gianluca Montecchi <gian@grys.it>
11 # W. Trevor King <wking@drexel.edu>
13 # This file is part of Bugs Everywhere.
15 # Bugs Everywhere is free software; you can redistribute it and/or modify it
16 # under the terms of the GNU General Public License as published by the
17 # Free Software Foundation, either version 2 of the License, or (at your
18 # option) any later version.
20 # Bugs Everywhere is distributed in the hope that it will be useful, but
21 # WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 # General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with Bugs Everywhere. If not, see <http://www.gnu.org/licenses/>.
30 DB2MAN = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
31 DB2HTML = http://docbook.sourceforge.net/release/xsl-ns/current/html/docbook.xsl
32 XP = /usr/bin/xsltproc --nonet --param man.charmap.use.subset "0" \
33 --param make.year.ranges "1" --param make.single.year.ranges "1"
35 #PATH = /usr/bin:/bin # must include sphinx-build for 'sphinx' target.
39 INSTALL_OPTIONS = "--prefix=${PREFIX}"
41 # Select the documentation you wish to build
44 # Directories with semantic meaning
46 MAN_DIR := ${DOC_DIR}/man
49 LIBBE_VERSION := libbe/_version.py
50 GENERATED_FILES := build $(LIBBE_VERSION)
52 MANPAGE_FILES = $(patsubst %,${MAN_DIR}/%,${MANPAGES})
53 GENERATED_FILES += ${MANPAGE_FILES}
61 build: $(LIBBE_VERSION)
69 python setup.py install ${INSTALL_OPTIONS}
76 $(RM) -rf ${GENERATED_FILES}
77 $(MAKE) -C ${DOC_DIR} clean
80 .PHONY: libbe/_version.py
82 git log -1 --date=short --pretty='format:"Autogenerated by make libbe/_version.py"%nversion_info = {%n "date":"%cd",%n "revision":"%H",%n "committer":"%cn"}%n' > $@
88 $(XP) -o $@ $(DB2MAN) $<
90 $(XP) -o $@ $(DB2HTML) $<
94 $(MAKE) -C ${DOC_DIR} html