#!/bin/sh
######################### BEGIN COPYRIGHT MESSAGE #########################
# GBNP - computing Gröbner bases of noncommutative polynomials
# Copyright 2001-2010 by Arjeh M. Cohen, Dié A.H. Gijsbers, Jan Willem
# Knopper, Chris Krook. Address: Discrete Algebra and Geometry (DAM) group
# at the Department of Mathematics and Computer Science of Eindhoven
# University of Technology.
# 
# For acknowledgements see the manual. The manual can be found in several
# formats in the doc subdirectory of the GBNP distribution. The
# acknowledgements formatted as text can be found in the file chap0.txt.
# 
# GBNP is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by the
# Free Software Foundation (FSF); either version 2.1 of the License, or
# (at your option) any later version. For details, see the file 'LGPL' in
# the doc subdirectory of the GBNP distribution or see the FSF's own site:
# http://www.gnu.org/licenses/lgpl.html
########################## END COPYRIGHT MESSAGE ##########################
{
#checks for $GAP
if [ -z "$GAP" ] 
then
	GAP=gap
fi

EXAMPLES=`cd ./doc/examples && 
	for i in bound-test*.g example*.g functions.g
	do
		 printf "%s" " $i" 
	done | sed -e 's/.g//g'`

#echo "EXAMPLES=$EXAMPLES"
printf "EXAMPLESG="
for e in $EXAMPLES
do
	printf "%s" " ${e}.g"
done
echo
printf "EXAMPLESXML="
for e in $EXAMPLES
do
	printf "%s" " ${e}.xml"
done
echo
printf "TESTS="
for e in $EXAMPLES
do
	printf "%s" " ${e}.test"
done |sed -e 's/example/test/g' -e 's/functions/test-functions/g' -e 's/bound-test/test-bound/g'
echo
printf "TESTSG="
for e in $EXAMPLES
do
	printf "%s" " ${e}.g"
done |sed -e 's/example/test/g' -e 's/functions/test-functions/g' -e 's/bound-test/test-bound/g'
echo
echo "GAP=${GAP} -L $(/bin/pwd)/build/gbnp.wks -l \\;$(/bin/pwd)/build"
echo
echo export GAP
echo
} >.depend
