[babl] Dispatch the custom_target in two custom_targets for cleaner dependency declaration.



commit c3b6d999a90fde28e09fe7d43f7feb0f269bfa86
Author: Félix Piédallu <felix piedallu me>
Date:   Fri Dec 1 15:31:43 2017 +0100

    Dispatch the custom_target in two custom_targets for cleaner dependency declaration.

 docs/meson.build |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/docs/meson.build b/docs/meson.build
index 98ca7a5..04ba667 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -15,8 +15,19 @@ index_static_html = configure_file(
   configuration: conf,
 )
 
+index_html_tmp = custom_target('index.html.tmp',
+  input : [ babl_html_dump, ],
+  output: [ 'index.html.tmp', ],
+  command: [ 'bash', '-c',
+    'BABL_PATH="' + join_paths(meson.build_root(), 'extensions') +'"'
+    + ' ' + babl_html_dump.full_path()
+  ],
+  capture: true,
+)
+
 index_html = custom_target('index.html',
   input : [
+    index_html_tmp,
     index_static_html,
     join_paths(meson.source_root(), 'AUTHORS'),
     join_paths(meson.source_root(), 'TODO'),
@@ -24,10 +35,8 @@ index_html = custom_target('index.html',
   ],
   output: [ 'index.html', ],
   command: [ 'bash', '-c',
-    'BABL_PATH="' + join_paths(meson.build_root(), 'extensions') +'"'
-    +' '+ babl_html_dump.full_path() +' > ' + '@OUTPUT@.tmp'
-    +' && '+ 'cp '+ join_paths(meson.build_root(), meson.current_source_dir(), 'index-static.html') +' 
@OUTPUT@'
-    +' && '+ xml_insert.path() +' @OUTPUT@ BablBase @OUTPUT@.tmp'
+    'cp '+ join_paths(meson.build_root(), meson.current_source_dir(), 'index-static.html') +' @OUTPUT@'
+    +' && '+ xml_insert.path() +' @OUTPUT@ BablBase '+ index_html_tmp.full_path()
     +' && '+ xml_insert.path() +' @OUTPUT@ AUTHORS  '+ join_paths(meson.source_root(), 'AUTHORS')
     +' && '+ xml_insert.path() +' @OUTPUT@ TODO     '+ join_paths(meson.source_root(), 'TODO')
     +' && '+ xml_insert.path() +' @OUTPUT@ NEWS     '+ join_paths(meson.source_root(), 'NEWS')
@@ -35,7 +44,6 @@ index_html = custom_target('index.html',
 )
 
 
-
 run_target('push_web',
   command: [
     'scp', index_html, index_static_html, babl_css, scptarget,


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