summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorFélix Piédallu <felix@piedallu.me>2017-12-01 14:47:10 +0100
committerØyvind Kolås <pippin@gimp.org>2017-12-16 02:44:00 +0100
commit67130ba4893108b570f1e914bf0ddd9429d4db51 (patch)
treea6a53fa8375a173f70e1ffdfe07b9240dcd7b492 /docs
parente617352e3ed19fe00091e94a005213a922cd60ec (diff)
Fix push_web, add index_html generation. TODO: simplify this someday
Diffstat (limited to 'docs')
-rw-r--r--docs/meson.build54
1 files changed, 19 insertions, 35 deletions
diff --git a/docs/meson.build b/docs/meson.build
index e021f71..98ca7a5 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -5,8 +5,9 @@ location= 'public_html/babl'
scptarget = host + ':' + location + '/'
-# The patterns used for html creation in the babl build system
-# is very small, and should probably be documented in a tutorial.
+babl_css = files('babl.css')
+
+xml_insert = find_program(join_paths('tools', 'xml_insert.sh'))
index_static_html = configure_file(
input : 'index-static.html.in',
@@ -14,48 +15,31 @@ index_static_html = configure_file(
configuration: conf,
)
-babl_path_src = join_paths(meson.source_root() + 'extensions')
-babl_path_bin = join_paths(meson.build_root() + 'extensions')
-
index_html = custom_target('index.html',
input : [
index_static_html,
- '../AUTHORS',
- '../TODO',
- '../NEWS',
+ join_paths(meson.source_root(), 'AUTHORS'),
+ join_paths(meson.source_root(), 'TODO'),
+ join_paths(meson.source_root(), 'NEWS'),
],
output: [ 'index.html', ],
- command: [
- # cp $< $@
- # (which mktemp > /dev/null 2>&1 && TMPFILE=`mktemp` || TMPFILE="/tmp/babl_build_tempfile" ;\
- # export BABL_PATH="$(top_builddir)/extensions:$(top_builddir)/extensions/.libs"; $(babl_html_dump) > $$TMPFILE;\
- # $(SHELL) $(top_srcdir)/docs/tools/xml_insert.sh $@ BablBase $$TMPFILE;\
- # rm -f $$TMPFILE )
- # echo -n "."
- #
- # $(SHELL) $(top_srcdir)/docs/tools/xml_insert.sh $@ AUTHORS $(top_srcdir)/AUTHORS
- # $(SHELL) $(top_srcdir)/docs/tools/xml_insert.sh $@ TODO $(top_srcdir)/TODO
- # $(SHELL) $(top_srcdir)/docs/tools/xml_insert.sh $@ NEWS $(top_srcdir)/NEWS
- # echo " [OK]"
+ 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'
+ +' && '+ 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')
],
)
-babl_css = files('babl.css')
-custom_target('push_web.sh',
- input : [
- index_html,
- index_static_html,
- babl_css,
- graphic_files_install,
- ],
- output: [
- 'push_web.sh',
- ],
+
+run_target('push_web',
command: [
- 'echo', '#!/bin/bash',
- '\n' + 'scp', index_html, index_static_html, babl_css, scptarget,
- '\n' + 'scp', graphic_files_install, scptarget + 'graphics/'
+ 'scp', index_html, index_static_html, babl_css, scptarget,
+ '&&',
+ 'scp', graphic_files_install, scptarget + 'graphics/'
],
- capture: true,
)