d4dc29c498
* scripts/include.mes: Grep all files. * GNUmakefile (mescc.cat): Update for mes-use-module; list all toplevel inputs. * module/language/c/lexer.mes: Use (system base lalr). * module/language/c/parser.mes: Likewise. * module/language/c/compiler.mes: Likewise. Remove encoding on output port. * scripts/mescc.mes: Remove BROKEN comment.
24 lines
577 B
Bash
Executable file
24 lines
577 B
Bash
Executable file
#! /bin/sh
|
|
|
|
if [ "$1" == "--help" ]; then
|
|
echo "Usage: include.mes FILE"
|
|
exit 0
|
|
fi
|
|
for prefix in $(dirname $(dirname $0))/share/mes . $(dirname $(dirname $0)); do
|
|
if [ -d ${prefix}/module ]; then
|
|
break;
|
|
fi
|
|
done
|
|
|
|
if [ -n "$BOOT" ]; then
|
|
echo $prefix/module/mes/loop-0.mes
|
|
if [ -n "$TYPE0" ]; then
|
|
echo $prefix/module/mes/type-0.mes
|
|
fi
|
|
echo $prefix/module/mes/mes-0.mes
|
|
fi
|
|
cat $@ \
|
|
| grep -Eo '^\(mes-use-module \([^ ()]+ [^()]+))' \
|
|
| grep -Eo ' \([^)]+\)' \
|
|
| sed -e "s@^ *(@${prefix}/module/@" -e 's@ @/@g' -e 's@)@.mes@'
|