Prechádzať zdrojové kódy

doc: generate our own version.texi file as the one generated by autotools only consider the file starpu.texi, and not the texi files in doc/chapters/

Nathalie Furmento 13 rokov pred
rodič
commit
a78ff099ec
2 zmenil súbory, kde vykonal 15 pridanie a 2 odobranie
  1. 14 1
      doc/Makefile.am
  2. 1 1
      doc/starpu.texi

+ 14 - 1
doc/Makefile.am

@@ -33,7 +33,8 @@ starpu_TEXINFOS = chapters/advanced-api.texi \
 	chapters/fft-support.texi \
 	chapters/using.texi \
 	chapters/vector_scal_opencl.texi \
-	chapters/socl.texi
+	chapters/socl.texi \
+	chapters/version.texi
 
 MAINTAINERCLEANFILES = starpu.pdf
 
@@ -45,6 +46,18 @@ AM_MAKEINFOHTMLFLAGS = --css-include=$(top_srcdir)/doc/starpu.css --no-headers -
 uninstall-local:
 	$(RM) $(DESTDIR)$(infodir)/dir
 
+#TODO: when stat is not available on the machine, insert "unknown date"
+chapters/version.texi:
+	@for f in $(starpu_TEXINFOS) ; do \
+                if test -f $(top_srcdir)/doc/$$f ; then stat --format=%Y $(top_srcdir)/doc/$$f ; fi \
+        done | sort -r | head -1 > timestamp
+	@LC_ALL=C date --date=@$(shell cat timestamp) +"%d %B %Y" > timestamp_updated
+	@LC_ALL=C date --date=@$(shell cat timestamp) +"%B %Y" > timestamp_updated_month
+	@echo "@set UPDATED " $(shell cat timestamp_updated) > $(top_srcdir)/doc/chapters/version.texi
+	@echo "@set UPDATED-MONTH" $(shell cat timestamp_updated_month) >> $(top_srcdir)/doc/chapters/version.texi
+	@echo "@set EDITION $(VERSION)" >> $(top_srcdir)/doc/chapters/version.texi
+	@echo "@set VERSION $(VERSION)" >> $(top_srcdir)/doc/chapters/version.texi
+
 #$(top_srcdir)/doc/starpu.texi: vector_scal_c.texi vector_scal_cuda.texi vector_scal_opencl.texi vector_scal_opencl_codelet.texi
 #vector_scal_c.texi: $(top_srcdir)/examples/basic_examples/vector_scal.c
 #	cat $< | sed 's/{/@{/g' | sed 's/}/@}/g' | sed 's/\t/    /g' > $@

+ 1 - 1
doc/starpu.texi

@@ -5,7 +5,7 @@
 @settitle StarPU Handbook
 @c %**end of header
 
-@include version.texi
+@include chapters/version.texi
 
 @copying
 Copyright @copyright{} 2009--2011  Universit@'e de Bordeaux 1