2016-10-12 21:40:11 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
2016-10-16 11:45:24 +00:00
|
|
|
if [ "$1" == "--help" ]; then
|
|
|
|
echo "Usage: include.mes FILE"
|
|
|
|
exit 0
|
|
|
|
fi
|
2016-10-16 06:00:04 +00:00
|
|
|
for prefix in $(dirname $(dirname $0))/share/mes . $(dirname $(dirname $0)); do
|
|
|
|
if [ -d ${prefix}/module ]; then
|
|
|
|
break;
|
|
|
|
fi
|
|
|
|
done
|
2016-10-20 20:03:17 +00:00
|
|
|
|
|
|
|
if [ -n "$BOOT" ]; then
|
|
|
|
echo $prefix/module/mes/loop-0.mes
|
Move optional type predicates to type.c.
* mes.c (char_p, macro_p, number_p, pair_p, string_p, symbol_p,
vector_p, builtin_p, boolean_p): Move to type.c
* type.c: New file.
* GNUmakefile (mes.o): Depend on type snarf output.
* module/mes/loop-0.mes (cond, map, let, or, and not, evlis-env,
apply-env, eval-expand, uquote, add-unquoters, eval,
expand-macro-env, eval-begin-env, eval-if-env, sexp:define,
env:define, env:macro): Move to mes-0.mes.
* module/mes/mes-0.mes: New file.
* module/mes/type-0.mes: New file.
* scripts/include.mes: If BOOT, also include mes-0.mes. If TYPE0,
also include type-0.mes.
2016-10-22 10:16:19 +00:00
|
|
|
if [ -n "$TYPE0" ]; then
|
|
|
|
echo $prefix/module/mes/type-0.mes
|
|
|
|
fi
|
|
|
|
echo $prefix/module/mes/mes-0.mes
|
2016-10-20 20:03:17 +00:00
|
|
|
fi
|
2016-12-17 09:57:38 +00:00
|
|
|
cat $@ \
|
2016-10-30 19:32:38 +00:00
|
|
|
| grep -Eo '^\(mes-use-module \([^ ()]+ [^()]+))' \
|
2016-10-12 21:40:11 +00:00
|
|
|
| grep -Eo ' \([^)]+\)' \
|
2016-10-16 06:00:04 +00:00
|
|
|
| sed -e "s@^ *(@${prefix}/module/@" -e 's@ @/@g' -e 's@)@.mes@'
|