]> git.lyx.org Git - lyx.git/blob - lib/build-listerrors
ANNOUNCE updates.
[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 if [ -z "`grep literate-article textclass.lst`" ]
25 then
26     touch listerrors
27     exit 0
28 fi
29
30 $lyx --export literate $dir/examples/Literate.lyx
31 # if no literate support stuff is installed nothing will be output
32 if [ -f $dir/examples/Literate.nw ]
33 then
34    mv $dir/examples/Literate.nw Literate.nw
35    which notangle 2>/dev/null && notangle -Rbuild-script Literate.nw | sh
36 else
37    # you don't have noweb installed so we'll produce a dummy file
38    # just so make doesn't keep trying to output it.
39    touch listerrors
40    # tell the user nothing bad happened
41    echo
42    echo "LyX did not detect NoWeb support. Proceeding normally."
43 fi
44
45 exit 0