]> rtime.felk.cvut.cz Git - omk.git/commitdiff
doc: Change how is the version number included
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Feb 2011 20:26:07 +0000 (21:26 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Feb 2011 20:43:45 +0000 (21:43 +0100)
Now, we use @include command, whereas earlier we have edited the source
with sed. The current method has the advantage that error messages refer
directly to the source file instead of the automatically generated one.

doc/Makefile
doc/omk-manual.texinfo

index 229171bfe43e53861d6b7d559e956e32fe86210e..b9fee7375cf99f529b9ea6fb2f44ad236d04ba3e 100644 (file)
@@ -3,13 +3,12 @@ VERSION:=$(shell git describe|sed -e 's/^v//')
 
 .PHONY: FORCE
 
-all: $(SOURCE).pdf $(SOURCE).txt $(SOURCE).html
+all: $(SOURCE).txt $(SOURCE).html $(SOURCE).pdf
 
 .version: FORCE
        echo $(VERSION) | cmp -s $@ - || echo $(VERSION) > $@
 
-%.texi: %.texinfo .version
-       sed -e 's/\$$Id\$$/$(VERSION)/g' < $< > $@
+%.texinfo: .version
 
 PNG_FIGS = $(wildcard *.png)
 PDF_FIGS = $(patsubst %.png,%.pdf,$(PNG_FIGS))
@@ -17,14 +16,14 @@ PDF_FIGS = $(patsubst %.png,%.pdf,$(PNG_FIGS))
 %.pdf: %.png
        convert $< -density 150 $@
 
-%.pdf: %.texi $(PDF_FIGS)
+%.pdf: %.texinfo $(PDF_FIGS)
        texi2dvi --pdf $<
        texi2dvi --pdf $<
 
-%.txt: %.texi
+%.txt: %.texinfo
        makeinfo --no-headers --force -o $@ $<
 
-%.html: %.texi
+%.html: %.texinfo
        makeinfo --html --no-split -o $@ $<
 #      texi2html --l2h $<
 # Fix texinfo HTML output
index bbff545d0c18d816ba360309acbaa084de2d0945..559c6684ad1afd5459f752636c32ab12ad73a61d 100644 (file)
@@ -6,7 +6,7 @@
 @c %**end of header
 
 @copying
-Manual for Ocera Make System (OMK) version $Id$
+Manual for Ocera Make System (OMK) version @include .version
 
 Copyright @copyright{} 2007, 2008, 2009, 2010, 2011 Michal Sojka, Pavel Pisa
 @end copying