From 1a313ebda0f7ced46236ebcfdc27b816530e865a Mon Sep 17 00:00:00 2001 From: Mark Lodato Date: Sun, 4 Oct 2009 22:36:40 -0400 Subject: [PATCH] freeze: Makefile: add target to build README.html Add a target (with alias "html") to build README.html from README.txt using rst2html. This is not run by default. --- Demos/freeze/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Demos/freeze/Makefile b/Demos/freeze/Makefile index 01d6cf8d..fe4f36ea 100644 --- a/Demos/freeze/Makefile +++ b/Demos/freeze/Makefile @@ -2,6 +2,7 @@ CC = gcc CYTHON = ../../bin/cython CYTHON_FREEZE = ../../bin/cython_freeze PYTHON = python +RST2HTML = rst2html PY_LDFLAGS = $(shell $(PYTHON) -c 'from distutils.sysconfig import get_config_var as g; print " ".join([g("LINKFORSHARED"), "-L"+g("LIBPL")])') PY_CPPFLAGS = $(shell $(PYTHON) -c 'from distutils.sysconfig import *; print "-I"+get_python_inc()') @@ -22,6 +23,7 @@ CYTHON_SECONDARY = $(CYTHON_SOURCE:.pyx=.c) $(TARGETS:=.c) all : $(TARGETS) +html : README.html $(TARGETS) : % : %.o $(CYTHON_SOURCE:.pyx=.o) @@ -34,8 +36,11 @@ python.c : %.c : %.pyx $(CYTHON) $(CYTHONFLAGS) $^ +%.html : %.txt + $(RST2HTML) $^ $@ + clean: - $(RM) *.o $(CYTHON_SECONDARY) $(TARGETS) + $(RM) *.o $(CYTHON_SECONDARY) $(TARGETS) README.html .PHONY: clean .SECONDARY: $(CYTHON_SECONDARY) -- 2.26.2