X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/blobdiff_plain/b9827fedcdc33e72b6b16f0834923109e2817546..b63e8c215b2452c3021c2f44ba2fb8a7ef5d5d6e:/doc/Makefile diff --git a/doc/Makefile b/doc/Makefile index c56449e..9f08bce 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,21 +1,30 @@ SOURCE = omk-manual +VERSION ?= $(shell date +%Y-%m-%d) + +.PHONY: FORCE all: $(SOURCE).pdf $(SOURCE).txt $(SOURCE).html +.version: FORCE + echo $(VERSION) | cmp -s $@ - || echo $(VERSION) > $@ + +%.texi: %.texinfo .version + sed -e 's/\$$Id\$$/$(VERSION)/g' < $< > $@ + PNG_FIGS = $(wildcard *.png) PDF_FIGS = $(patsubst %.png,%.pdf,$(PNG_FIGS)) %.pdf: %.png convert $< -density 150 $@ -$(SOURCE).pdf: $(SOURCE).texinfo $(PDF_FIGS) +%.pdf: %.texi $(PDF_FIGS) texi2dvi --pdf $< texi2dvi --pdf $< -$(SOURCE).txt: $(SOURCE).texinfo +%.txt: %.texi makeinfo --no-headers --force -o $@ $< -$(SOURCE).html: $(SOURCE).texinfo +%.html: %.texi makeinfo --html --no-split -o $@ $< # texi2html --l2h $< # Fix texinfo HTML output @@ -26,11 +35,11 @@ $(SOURCE).html: $(SOURCE).texinfo # mv $@.tmp $@ clean: - rm -f $(SOURCE).{aux,cp,cps,fn,ky,log,pg,toc,tp,vr,vrs} $(PDF_FIGS) + rm -f $(SOURCE).{aux,cp,cps,fn,ky,log,pg,toc,tp,vr,vrs} $(PDF_FIGS) .version WWW ?= www -web: $(WWW) $(addprefix $(WWW)/,index.html $(SOURCE).html $(wildcard *.png) $(SOURCE).pdf) +web: all $(WWW) $(addprefix $(WWW)/,index.html $(SOURCE).html $(wildcard *.png) $(SOURCE).pdf) $(WWW): mkdir $@