[gtk-doc] make: also set a date format string to format elapsed time



commit 541a498ee69001a5515a7589989666bd5c9f8944
Author: Stefan Sauer <ensonic users sf net>
Date:   Fri Feb 14 09:52:24 2014 +0100

    make: also set a date format string to format elapsed time

 configure.ac              |    3 +++
 tests/gtk-doc.make        |   18 +++++++++---------
 tests/gtk-doc.notmpl.make |   16 ++++++++--------
 3 files changed, 20 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 93bd158..b699568 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,10 +213,13 @@ dnl check what date format we can use for the makefile tracing in tests
 date +%s.%N | grep -q '%N'
 if test "$?" == "1"; then
   TS_FMT="+%s.%N"
+  ELAPSED_FMT="+%H:%M:%S.%N"
 else
   TS_FMT="+%s.0"
+  ELAPSED_FMT="+%H:%M:%S"
 fi
 AC_SUBST(TS_FMT)
+AC_SUBST(ELAPSED_FMT)
 
 dnl
 dnl Documentation
diff --git a/tests/gtk-doc.make b/tests/gtk-doc.make
index 39fd8bf..8c16651 100644
--- a/tests/gtk-doc.make
+++ b/tests/gtk-doc.make
@@ -54,11 +54,11 @@ CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
 
 check-local: html-build.stamp pdf-build.stamp
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: All done"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: All done"
 
 docs: html-build.stamp pdf-build.stamp
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: All done"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: All done"
 
 $(REPORT_FILES): sgml-build.stamp
 
@@ -87,7 +87,7 @@ setup-build.stamp: ts
 
 scan-build.stamp: ts setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: Scanning header files"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: Scanning header files"
        @_source_dir='' ; \
        for i in $(DOC_SOURCE_DIR) ; do \
            _source_dir="$${_source_dir} --source-dir=$$i" ; \
@@ -97,7 +97,7 @@ scan-build.stamp: ts setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
        gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} 
$(SCAN_OPTIONS) $(EXTRA_HFILES) 2>&1 | tee -a gtkdoc-scan.log
        @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
                ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-           echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: Introspecting gobjects"; \
+           echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: Introspecting gobjects"; \
            scanobj_options=""; \
            if test "x$(V)" = "x1"; then \
                scanobj_options="--verbose"; \
@@ -120,7 +120,7 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)
 
 tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt 
$(DOC_MODULE)-overrides.txt
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: Rebuilding template files"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: Rebuilding template files"
        @echo "gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)" >gtkdoc-mktmpl.log; \
        PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
        gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) 2>&1 | tee -a gtkdoc-mktmpl.log
@@ -141,7 +141,7 @@ $(srcdir)/tmpl/*.sgml:
 
 sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: Building XML"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: Building XML"
        @_source_dir='' ; \
        for i in $(DOC_SOURCE_DIR) ; do \
            _source_dir="$${_source_dir} --source-dir=$$i" ; \
@@ -158,7 +158,7 @@ sgml.stamp: sgml-build.stamp
 
 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @00$$tsd +%H:%M:%S.%N`: Building HTML"
+       echo "  DOC   `date --utc --date @00$$tsd $(ELAPSED_FMT)`: Building HTML"
        @rm -rf html
        @mkdir html
        @mkhtml_options=""; \
@@ -178,7 +178,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
          fi; \
        done;
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: Fixing cross-references"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: Fixing cross-references"
        @echo "gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) 
$(FIXXREF_OPTIONS)" >gtkdoc-fixxref.log; \
        PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
        gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) 
2>&1 | tee -a gtkdoc-fixxref.log
@@ -188,7 +188,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
 
 pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: Building PDF"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: Building PDF"
        @rm -f $(DOC_MODULE).pdf
        @mkpdf_options=""; \
        if test "x$(V)" = "x1"; then \
diff --git a/tests/gtk-doc.notmpl.make b/tests/gtk-doc.notmpl.make
index fbdf8a9..b4f2994 100644
--- a/tests/gtk-doc.notmpl.make
+++ b/tests/gtk-doc.notmpl.make
@@ -54,11 +54,11 @@ CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
 
 check-local: html-build.stamp pdf-build.stamp
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: All done"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: All done"
 
 docs: html-build.stamp pdf-build.stamp
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: All done"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: All done"
 
 $(REPORT_FILES): sgml-build.stamp
 
@@ -84,7 +84,7 @@ setup-build.stamp: ts
 
 scan-build.stamp: ts setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: Scanning header files"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: Scanning header files"
        @_source_dir='' ; \
        for i in $(DOC_SOURCE_DIR) ; do \
            _source_dir="$${_source_dir} --source-dir=$$i" ; \
@@ -94,7 +94,7 @@ scan-build.stamp: ts setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
        gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} 
$(SCAN_OPTIONS) $(EXTRA_HFILES) 2>&1 | tee -a gtkdoc-scan.log
        @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
                ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-           echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: Introspecting gobjects"; \
+           echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: Introspecting gobjects"; \
            scanobj_options=""; \
            if test "x$(V)" = "x1"; then \
                scanobj_options="--verbose"; \
@@ -117,7 +117,7 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)
 
 sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt 
$(DOC_MODULE)-overrides.txt $(expand_content_files)
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: Building XML"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: Building XML"
        @_source_dir='' ; \
        for i in $(DOC_SOURCE_DIR) ; do \
            _source_dir="$${_source_dir} --source-dir=$$i" ; \
@@ -134,7 +134,7 @@ sgml.stamp: sgml-build.stamp
 
 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @00$$tsd +%H:%M:%S.%N`: Building HTML"
+       echo "  DOC   `date --utc --date @00$$tsd $(ELAPSED_FMT)`: Building HTML"
        @rm -rf html
        @mkdir html
        @mkhtml_options=""; \
@@ -154,7 +154,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
          fi; \
        done;
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: Fixing cross-references"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: Fixing cross-references"
        @echo "gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) 
$(FIXXREF_OPTIONS)" >gtkdoc-fixxref.log; \
        PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
        gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) 
2>&1 | tee -a gtkdoc-fixxref.log
@@ -164,7 +164,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
 
 pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
        @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
-       echo "  DOC   `date --utc --date @0$$tsd +%H:%M:%S.%N`: Building PDF"
+       echo "  DOC   `date --utc --date @0$$tsd $(ELAPSED_FMT)`: Building PDF"
        @rm -f $(DOC_MODULE).pdf
        @mkpdf_options=""; \
        if test "x$(V)" = "x1"; then \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]