-SOURCE = omk-manual
VERSION:=$(shell git describe|sed -e 's/^v//')
+OLDVERSION:=$(shell cat .version 2>/dev/null)
.PHONY: FORCE
-all: $(SOURCE).txt $(SOURCE).html $(SOURCE).pdf
+all: omk-manual.txt omk-manual.html omk-manual.pdf
+ifneq ($(VERSION),$(OLDVERSION))
.version: FORCE
echo $(VERSION) | cmp -s $@ - || echo $(VERSION) > $@
-
-%.texinfo: .version
+endif
PNG_FIGS = $(wildcard *.png)
PDF_FIGS = $(patsubst %.png,%.pdf,$(PNG_FIGS))
%.pdf: %.png
convert $< -density 150 $@
-%.pdf: %.texinfo $(PDF_FIGS)
+%.pdf: %.texinfo $(PDF_FIGS) .version
texi2dvi --pdf $<
texi2dvi --pdf $<
-%.txt: %.texinfo
+%.txt: %.texinfo .version
makeinfo --no-headers --force -o $@ $<
-%.html: %.texinfo
+%.html: %.texinfo .version
makeinfo --html --no-split -o $@ $<
# texi2html --l2h $<
# Fix texinfo HTML output
# mv $@.tmp $@
clean:
- rm -f $(addprefix $(SOURCE).,aux cp cps fn ky log pg toc tp vr vrs) $(PDF_FIGS) .version
+ rm -f $(addprefix omk-manual.,aux cp cps fn ky log pg toc tp vr vrs) $(PDF_FIGS) .version
WWW ?= www
-web: all $(WWW) $(addprefix $(WWW)/,index.html $(SOURCE).html $(wildcard *.png) $(SOURCE).pdf $(wildcard RelNotes*.txt))
+web: all $(WWW) $(addprefix $(WWW)/,index.html omk-manual.html $(wildcard *.png) omk-manual.pdf $(wildcard RelNotes*.txt))
$(WWW):
mkdir $@