Autogenerate search.php from the html templates
[senf.git] / doclib / SConscript
1 # -*- python -*-
2
3 Import('env')
4 import SENFSCons
5
6 ###########################################################################
7
8 # This is not nice .. really ...
9 env.Alias(
10     'all_docs',
11     env.Command('search.php',
12                 [ 'doxy-header-overview.html', 'doxy-footer.html', 'html-munge.xsl' ], 
13                 [ "sed -e 's/\\$$title/Search results/g' -e 's/\\$$projectname/Overview/g' ${SOURCES[0]} > ${TARGET}.tmp",
14                   'echo "PHPSEARCH" >> ${TARGET}.tmp',
15                   'cat ${SOURCES[1]} >> ${TARGET}.tmp',
16                   'xsltproc --nonet --html --stringparam topdir .. -o - ${SOURCES[2]} ${TARGET}.tmp 2>/dev/null'
17                   + '| sed -e "s/PHPSEARCH/<?php include \'search_functions.php\'; ?><?php search(); ?>/" > $TARGET',
18                   'rm -f ${TARGET}.tmp' ]))
19