From: Michal Sojka Date: Thu, 17 Feb 2011 20:39:28 +0000 (+0100) Subject: doc/Makefile: Correct dependencies on .version X-Git-Url: http://rtime.felk.cvut.cz/gitweb/omk.git/commitdiff_plain/c5c7261ade2a1e917c1bfc4980d99b392d60315d doc/Makefile: Correct dependencies on .version --- diff --git a/doc/Makefile b/doc/Makefile index b9fee73..8d85f0c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,14 +1,14 @@ -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)) @@ -16,14 +16,14 @@ 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 @@ -34,11 +34,11 @@ PDF_FIGS = $(patsubst %.png,%.pdf,$(PNG_FIGS)) # 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 $@