[oe] [PATCH] usermanual: use the latest git revison date of the usermanual dir as pubdate. Basic idea taken from http://sources.redhat.com/ml/docbook-apps/2003-q2/msg00036.html

Bernhard.Guillon at opensimpad.org Bernhard.Guillon at opensimpad.org
Sat Dec 4 12:48:22 UTC 2010


From: Bernhard Guillon <Bernhard.Guillon at opensimpad.org>


Signed-off-by: Bernhard Guillon <Bernhard.Guillon at opensimpad.org>
---
 docs/usermanual/Makefile       |    7 ++++++-
 docs/usermanual/usermanual.xml |    3 +++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/docs/usermanual/Makefile b/docs/usermanual/Makefile
index 36ea5e2..cde0918 100644
--- a/docs/usermanual/Makefile
+++ b/docs/usermanual/Makefile
@@ -26,12 +26,15 @@ define command
 endef
 endif
 
+releasedate:
+	git log --date=iso -n 1 --date-order ./ | grep Date | cut -f 2-$N -d ":" > releasedate.txt
+
 all: $(types)
 
 lint: $(manual) FORCE
 	$(call command,xmllint --xinclude --postvalid --noout $(manual),XMLLINT $(manual))
 
-$(types) $(foreach type,$(htmltypes),$(type)-nochunks): lint FORCE
+$(types) $(foreach type,$(htmltypes),$(type)-nochunks): releasedate lint FORCE
 
 $(foreach type,$(htmltypes),$(type)-nochunks): $(if $(htmlcss),$(htmlcss)) $(manual)
 	@mkdir -p $@
@@ -59,4 +62,6 @@ clean:
 $(foreach i,$(types) $(foreach type,$(htmltypes),$(type)-nochunks),clean-$(i)):
 	rm -rf $(patsubst clean-%,%,$@)
 
+.PHONY: releasedate
+
 FORCE: 
diff --git a/docs/usermanual/usermanual.xml b/docs/usermanual/usermanual.xml
index dc38aba..8cd5d97 100644
--- a/docs/usermanual/usermanual.xml
+++ b/docs/usermanual/usermanual.xml
@@ -5,6 +5,7 @@
 -->
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY releasedate SYSTEM "releasedate.txt">
 <!ENTITY chapter-introduction SYSTEM "chapters/introduction.xml">
 <!ENTITY chapter-metadata SYSTEM "chapters/metadata.xml">
 <!ENTITY chapter-gettingoe SYSTEM "chapters/getting_oe.xml">
@@ -59,6 +60,8 @@
       <holder>Rolf Leggewie</holder>
     </copyright>
 
+    <pubdate>&releasedate;</pubdate>
+
     <legalnotice>
       <para>This work is licensed under the Creative Commons Attribution
       License. To view a copy of this license, visit <ulink
-- 
1.7.1





More information about the Openembedded-devel mailing list