From 960565a8cc80f98d0a8bfa77029fbc78692ea1a1 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 8 Feb 2010 17:02:56 -0500 Subject: Consolidated Makefile and doc/man/module.mk. Incorperated doc/Makefile. Now make sphinx builds the Sphinx HTML documentation (in doc/.build/html), and make clean cleans up everything. Having a separate module.mk was just making things confusing, so I took it out ;). --- Makefile | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) (limited to 'Makefile') 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 -- cgit