X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/blobdiff_plain/39b3a1295022e912d63828672478f3cb8dccbaf2..26fb4643dee215ddff5c18dd960b23adc8909c3a:/doc/Makefile diff --git a/doc/Makefile b/doc/Makefile index 39e2ecb..7ba3aab 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,22 +1,31 @@ SOURCE = omk-manual +VERSION:=$(shell git describe|sed -e 's/^v//') + +.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 $@ -%.pdf: %.texinfo $(PDF_FIGS) +%.pdf: %.texi $(PDF_FIGS) texi2dvi --pdf $< texi2dvi --pdf $< -%.txt: %.texinfo +%.txt: %.texi makeinfo --no-headers --force -o $@ $< -%.html: %.texinfo - makeinfo --html --no-split $< -o $@ +%.html: %.texi + makeinfo --html --no-split -o $@ $< # texi2html --l2h $< # Fix texinfo HTML output # perl -w -n -e 'if (/
/) {$$toc=1}' \ @@ -26,11 +35,11 @@ PDF_FIGS = $(patsubst %.png,%.pdf,$(PNG_FIGS)) # 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 $(wildcard RelNotes*.txt)) $(WWW): mkdir $@