Generate local.ent from local.ent.in with version
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 21 May 2015 09:28:27 +0000 (11:28 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 21 May 2015 09:28:27 +0000 (11:28 +0200)
doc/Makefile
doc/local.ent.in [new file with mode: 0644]

index 58eceff..18f3b8a 100644 (file)
@@ -4,6 +4,8 @@
 
 prefix = /usr
 
+VERSION=$(shell . ../IDMETA; echo $$VERSION)
+
 XSLTPROC_COMPILE = xsltproc --xinclude -path "."
 HTML_COMPILE = $(XSLTPROC_COMPILE) common/id.htmlhelp.xsl
 MAN_COMPILE = $(XSLTPROC_COMPILE) common/id.man.xsl
@@ -14,10 +16,10 @@ XMLFILES=book.xml manref.xml
 
 all: index.html $(MANFILES)
 
-index.html: $(XMLFILES)
+index.html: $(XMLFILES) local.ent
        $(HTML_COMPILE) book.xml
 
-manref.xml: $(REFFILES)
+manref.xml: $(REFFILES) local.ent
        rm -f manref.xml
        for i in $(REFFILES); do \
                xsltproc stripref.xsl $$i | sed 1d >>manref.xml; \
@@ -31,6 +33,9 @@ clean:
 
 distclean: clean
 
+local.ent: local.ent.in 
+       sed "s/@VERSION@/$(VERSION)/" <local.ent.in >local.ent
+
 check: all
 
 install:
diff --git a/doc/local.ent.in b/doc/local.ent.in
new file mode 100644 (file)
index 0000000..7b2eb41
--- /dev/null
@@ -0,0 +1 @@
+<!ENTITY version "@VERSION@">