[library-web] do not rebuild mallard documentation if it didn't change (GNOME bug 672218)
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web] do not rebuild mallard documentation if it didn't change (GNOME bug 672218)
- Date: Sun, 12 Aug 2012 12:38:45 +0000 (UTC)
commit 28d1d4a670dec4f53bf903b32d0168ba37c9512b
Author: FrÃdÃric PÃters <fpeters 0d be>
Date: Sun Aug 12 14:38:02 2012 +0200
do not rebuild mallard documentation if it didn't change (GNOME bug 672218)
src/modtypes/mallard.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/modtypes/mallard.py b/src/modtypes/mallard.py
index a34278e..4ddf050 100644
--- a/src/modtypes/mallard.py
+++ b/src/modtypes/mallard.py
@@ -263,6 +263,17 @@ class MallardModule(DocModule):
lang_dirname = os.path.join(ext_dirname, self.dirname, 'C')
else:
lang_dirname = os.path.join(ext_dirname, self.dirname, lang)
+
+ if not app.rebuild_all and os.path.exists(
+ os.path.join(web_output_dir, 'index.html.%s' % lang)):
+ mtime = os.stat(os.path.join(web_output_dir, 'index.html.%s' % lang))[stat.ST_MTIME]
+ else:
+ mtime = 0
+
+ if mtime > max(self.mtime_tarball, self.mtime_xslt_files):
+ logging.debug('using already generated doc (lang: %s)' % lang)
+ continue
+
mallard_cache = MallardCache()
for doc_page in doc_pages:
xml_file = os.path.join(lang_dirname, doc_page)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]