aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile53
-rw-r--r--doc/Makefile27
-rw-r--r--doc/man/module.mk44
3 files changed, 46 insertions, 78 deletions
diff --git a/Makefile b/Makefile
index 5e2c4f4..e9e1748 100644
--- a/Makefile
+++ b/Makefile
@@ -24,51 +24,58 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
SHELL = /bin/bash
-PATH = /usr/bin:/bin
-
-# Directories with semantic meaning
-DOC_DIR := doc/man
-
-# Variables that will be extended by module include files
-GENERATED_FILES := libbe/_version.py build
-CODE_MODULES :=
-CODE_PROGRAMS :=
-
-# List of modules (directories) that comprise our 'make' project
-MODULES += ${DOC_DIR}
-
RM = rm
+#PATH = /usr/bin:/bin # must include sphinx-build for 'sphinx' target.
#PREFIX = /usr/local
PREFIX = ${HOME}
INSTALL_OPTIONS = "--prefix=${PREFIX}"
+# Directories with semantic meaning
+DOC_DIR := doc
+MAN_DIR := ${DOC_DIR}/man
+
+MANPAGES = be.1
+GENERATED_FILES := build libbe/_version.py
+
+MANPAGE_FILES = $(patsubst %,${MAN_DIR}/%,${MANPAGES})
+GENERATED_FILES += ${MANPAGE_FILES}
+
.PHONY: all
all: build
-# Include the make data for each module
-include $(patsubst %,%/module.mk,${MODULES})
-
.PHONY: build
build: libbe/_version.py
python setup.py build
+.PHONY: doc
+doc: sphinx man
+
.PHONY: install
-install: doc build
+install: build doc
python setup.py install ${INSTALL_OPTIONS}
-#cp -v interfaces/xml/* ${PREFIX}/bin
-#cp -v interfaces/email/catmutt ${PREFIX}/bin
-
+test: build
+ python test.py
+
.PHONY: clean
clean:
$(RM) -rf ${GENERATED_FILES}
+ $(MAKE) -C ${DOC_DIR} clean
-test : build
- python test.py
-
+
.PHONY: libbe/_version.py
libbe/_version.py:
bzr version-info --format python > $@
+
+.PHONY: man
+man: ${MANPAGE_FILES}
+
+%.1: %.1.sgml
+ docbook-to-man $< > $@
+
+.PHONY: sphinx
+sphinx:
+ $(MAKE) -C ${DOC_DIR} html
diff --git a/doc/Makefile b/doc/Makefile
index df8818c..6d7bbc5 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -26,37 +26,38 @@ help:
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
+ @echo " libbe to autogenerate files for all libbe modules"
clean:
- -rm -rf $(BUILDDIR)/*
+ -rm -rf $(BUILDDIR) libbe
-html:
+html: libbe
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-dirhtml:
+dirhtml: libbe
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-pickle:
+pickle: libbe
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
-json:
+json: libbe
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
-htmlhelp:
+htmlhelp: libbe
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
-qthelp:
+qthelp: libbe
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
@@ -65,25 +66,29 @@ qthelp:
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/bugs-everywhere.qhc"
-latex:
+latex: libbe
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."
-changes:
+changes: libbe
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
-linkcheck:
+linkcheck: libbe
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
-doctest:
+doctest: libbe
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
+
+.PHONY : libbe
+libbe :
+ python generate-libbe-txt.py
diff --git a/doc/man/module.mk b/doc/man/module.mk
deleted file mode 100644
index 1eb6955..0000000
--- a/doc/man/module.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# :vim: filetype=make : -*- makefile; coding: utf-8; -*-
-
-# doc/module.mk
-# Part of Bugs Everywhere, a distributed bug tracking system.
-#
-# Copyright (C) 2008-2010 Chris Ball <cjb@laptop.org>
-# Gianluca Montecchi <gian@grys.it>
-# W. Trevor King <wking@drexel.edu>
-#
-# 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-# Makefile module for documentation
-
-MODULE_DIR := doc/man
-
-MANPAGES = be.1
-manpage_files = $(patsubst %,${MODULE_DIR}/%,${MANPAGES})
-
-GENERATED_FILES += ${manpage_files}
-
-
-.PHONY: doc
-doc: man
-
-build: doc
-
-
-.PHONY: man
-man: ${manpage_files}
-
-%.1: %.1.sgml
- docbook-to-man $< > $@