Add switches to disable building of COBOL or C parts.

This commit is contained in:
Quinn Evans 2015-10-01 13:06:51 -06:00
parent c5ab929205
commit 10856dab96
1 changed files with 18 additions and 4 deletions

View File

@ -1,5 +1,7 @@
#!/bin/sh
args=`getopt d $*`
BUILD_COBOL=1
BUILD_C=1
args=`getopt dCc $*`
if [ $? -ne 0 ]; then
echo 'Usage: sh gnu-cobol.sh [-d]'
exit 2
@ -11,13 +13,25 @@ while true; do
DEBUG=1
shift
;;
-C)
unset BUILD_COBOL
shift
;;
-c)
unset BUILD_C
shift
;;
--)
shift
break
;;
esac
done
${CC:-cc} ${DEBUG:+-DDEBUG} -o channel.o -c channel.c
${COBC:-cobc} ${DEBUG:+-fdebugging-line} -x WOPO-CNF.COB PRINTCNF.COB
${COBC:-cobc} ${DEBUG:+-fdebugging-line} -x WOPO.COB IRC-MSG.COB PRINTCNF.COB DECASCII.COB ENCASCII.COB BF-RUN.COB channel.o
if [ $BUILD_C ]; then
${CC:-cc} ${DEBUG:+-DDEBUG} -o channel.o -c channel.c
fi
if [ $BUILD_COBOL ]; then
${COBC:-cobc} ${DEBUG:+-fdebugging-line} -x WOPO-CNF.COB PRINTCNF.COB
${COBC:-cobc} ${DEBUG:+-fdebugging-line} -x WOPO.COB IRC-MSG.COB PRINTCNF.COB DECASCII.COB ENCASCII.COB BF-RUN.COB channel.o
fi