]> git.lyx.org Git - lyx.git/blob - lib/build-listerrors
patch from dekel
[lyx.git] / lib / build-listerrors
1 #!/bin/sh
2 #
3 # Attempt to build listerrors (see examples/Literate.lyx) at build-time
4 #
5 # Author: Kayvan Sylvan <kayvan@sylvan.com>
6 #
7 # Assume notangle is on the path
8
9 if [ $# -eq 1 ]
10 then
11     dir=$1
12 else
13     dir=.
14 fi
15
16 if [ -r ../src/lyx ]
17 then
18     lyx=../src/lyx
19 else
20     # Assumed to be on the path
21     lyx=lyx 
22 fi
23
24 $lyx --export literate $dir/examples/Literate.lyx
25 # if no literate support stuff is installed nothing will be output
26 if [ -f $dir/examples/Literate.nw ]
27 then
28    mv $dir/examples/Literate.nw Literate.nw
29    which notangle 2>/dev/null && notangle -Rbuild-script Literate.nw | sh
30 else
31    # you don't have noweb installed so we'll produce a dummy file
32    # just so make doesn't keep trying to output it.
33    touch listerrors
34 fi
35
36 exit 0