X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fbuild-listerrors;h=9776b028d31d705cf3719e2a63428e4a6a08bd08;hb=c75c6e446a8bc0dbaabaf156c0abfd622c050129;hp=bb5cec083efe77c9c28791187e48c7006a6bae7a;hpb=793da498a2229373fab957687a32b61714304d4c;p=lyx.git diff --git a/lib/build-listerrors b/lib/build-listerrors index bb5cec083e..9776b028d3 100755 --- a/lib/build-listerrors +++ b/lib/build-listerrors @@ -6,14 +6,40 @@ # # Assume notangle is on the path +if [ $# -eq 1 ] +then + dir=$1 +else + dir=. +fi + if [ -r ../src/lyx ] then lyx=../src/lyx else # Assumed to be on the path - lyx=lyx + lyx=lyx +fi + +if [ -z "`grep literate-article textclass.lst`" ] +then + touch listerrors + exit 0 +fi + +$lyx --export literate $dir/examples/Literate.lyx +# if no literate support stuff is installed nothing will be output +if [ -f $dir/examples/Literate.nw ] +then + mv $dir/examples/Literate.nw Literate.nw + which notangle 2>/dev/null && notangle -Rbuild-script Literate.nw | sh +else + # you don't have noweb installed so we'll produce a dummy file + # just so make doesn't keep trying to output it. + touch listerrors + # tell the user nothing bad happened + echo + echo "LyX did not detect NoWeb support. Proceeding normally." fi -$lyx --export nw examples/Literate.lyx -mv examples/Literate.nw Literate.nw -notangle -Rbuild-script Literate.nw | sh +exit 0