In message <5495cf4c.20...@tongareva.de> on Sat, 20 Dec 2014 20:34:36 +0100,
Ulrich Pegelow <ulrich.pege...@tongareva.de> said:
ulrich.pegelow> Am 20.12.2014 um 19:44 schrieb Richard Levitte:
ulrich.pegelow> > An external reference will certainly have a colon, so
something like
ulrich.pegelow> > this (assuming they're all surrounded by ")?
ulrich.pegelow> >
ulrich.pegelow> > 's|"\([^":]*\.html\)"|"\1.php"|g'
ulrich.pegelow> >
ulrich.pegelow> > I haven't really tested much, but it's an idea...
ulrich.pegelow>
ulrich.pegelow> OK, looks reasonable. But now come the subtleties: how to make
this
ulrich.pegelow> work with the quotations marks? Means: works as a
CMakeLists.txt,
ulrich.pegelow> works as a shell command, works as a sed -e expression and does
what
ulrich.pegelow> it's supposed to do. Just putting in the suggested string
already
ulrich.pegelow> fails at the cmake level :(
Hmmm, it appears cmake does some odd treatment of strings or
something... I don't quite get it, it seems it copies them verbatim
(except for doubling $ signs, of course), so I thought my string would
go through without problems.
Anyhow, the diff I'm attaching goes through and produces a sensible
build/doc/usermanual/CMakeFiles/darktable-usermanual-wordpress.dir/build.make
as far as I can tell (*). Please try it out.
(*) I've problems with my saxon/docbook setup, I keep getting this
when trying to produce a wp manual (running with 'make VERBOSE=1'):
[ 97%] Building php usermanual
cd /home/levitte/gitwrk/github.com/darktable-swedish/doc/usermanual &&
/usr/bin/java -cp
/etc/xml/resolver:/usr/share/java/saxon.jar:/usr/share/java/saxon.jar
com.icl.saxon.StyleSheet
/home/levitte/gitwrk/github.com/darktable-swedish/build/doc/usermanual/darktable_single.xml
xsl/darktable_html_ext.xsl chunker.output.encoding=UTF-8
base.dir=/home/levitte/gitwrk/github.com/darktable-swedish/build/doc/usermanual/wp/
No adjustColumnWidths function available.
Processing terminated by xsl:message at line 402
doc/usermanual/CMakeFiles/darktable-usermanual-wordpress.dir/build.make:51:
recipe for target 'doc/usermanual/wp/index.html.php' failed
make[3]: *** [doc/usermanual/wp/index.html.php] Error 1
make[3]: Leaving directory
'/home/levitte/gitwrk/github.com/darktable-swedish/build'
CMakeFiles/Makefile2:7909: recipe for target
'doc/usermanual/CMakeFiles/darktable-usermanual-wordpress.dir/all' failed
make[2]: ***
[doc/usermanual/CMakeFiles/darktable-usermanual-wordpress.dir/all] Error 2
make[2]: Leaving directory
'/home/levitte/gitwrk/github.com/darktable-swedish/build'
CMakeFiles/Makefile2:7917: recipe for target
'doc/usermanual/CMakeFiles/darktable-usermanual-wordpress.dir/rule' failed
make[1]: ***
[doc/usermanual/CMakeFiles/darktable-usermanual-wordpress.dir/rule] Error 2
make[1]: Leaving directory
'/home/levitte/gitwrk/github.com/darktable-swedish/build'
Makefile:2996: recipe for target 'darktable-usermanual-wordpress' failed
make: *** [darktable-usermanual-wordpress] Error 2
Cheers,
Richard
--
Richard Levitte rich...@levitte.org
http://richard.levitte.org/
"Life is a tremendous celebration - and I'm invited!"
-- from a friend's blog, translated from Swedish
diff --git a/doc/usermanual/CMakeLists.txt b/doc/usermanual/CMakeLists.txt
index 873569f..9f9a7dd 100644
--- a/doc/usermanual/CMakeLists.txt
+++ b/doc/usermanual/CMakeLists.txt
@@ -180,7 +180,7 @@ if(can_build_usermanual)
COMMAND find ${CMAKE_CURRENT_BINARY_DIR}/wp -name *.html -exec sed -n -i "1h;1!H;\${;g;s/<body[^>]*>/<?php get_header(); ?><div id=\"primary\"><div id=\"content\" role=\"main\"><div class=\"usermanual\">/g;p;}" {} \;
COMMAND find ${CMAKE_CURRENT_BINARY_DIR}/wp -name *.html -exec sed -n -i "1h;1!H;\${;g;s/<\\/body><\\/html>/<\\/div><\\/div><\\/div><?php get_footer(); ?>/g;p;}" {} \;
- COMMAND find ${CMAKE_CURRENT_BINARY_DIR}/wp -name *.html -exec sed -n -i "1h;1!H;\${;g;s/\\.html/\\.html\\.php/g;p;}" {} \;
+ COMMAND find ${CMAKE_CURRENT_BINARY_DIR}/wp -name *.html -exec sed -n -i "1h;1!H;\${;g;s|\"\\([^\":]*\\.html\\)\"|\"\\1.php\"|g;p;}" {} \;
COMMAND find ${CMAKE_CURRENT_BINARY_DIR}/wp -name *.html -exec mv {} {}.php \;
COMMAND cp -r ${CMAKE_CURRENT_BINARY_DIR}/media/images ${CMAKE_CURRENT_BINARY_DIR}/wp/
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -197,7 +197,7 @@ if(can_build_usermanual)
COMMAND find ${CMAKE_CURRENT_BINARY_DIR}/wp -name *.html -exec sed -i "s/<body[^>]*>/<?php get_header(); ?><div id=\"primary\"><div id=\"content\" role=\"main\"><div class=\"usermanual\">/g" {} \;
COMMAND find ${CMAKE_CURRENT_BINARY_DIR}/wp -name *.html -exec sed -i "s/<\\/body><\\/html>/<\\/div><\\/div><\\/div><?php get_footer(); ?>/g" {} \;
- COMMAND find ${CMAKE_CURRENT_BINARY_DIR}/wp -name *.html -exec sed -i "s/\\.html/\\.html\\.php/g" {} \;
+ COMMAND find ${CMAKE_CURRENT_BINARY_DIR}/wp -name *.html -exec sed -i "s|\"\\([^\":]*\\.html\\)\"|\"\\1.php\"|g" {} \;
COMMAND find ${CMAKE_CURRENT_BINARY_DIR}/wp -name *.html -exec mv {} {}.php \;
COMMAND cp -r ${CMAKE_CURRENT_BINARY_DIR}/media/images ${CMAKE_CURRENT_BINARY_DIR}/wp/
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
darktable-devel mailing list
darktable-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/darktable-devel