build: all-go: Support V=0,1,2.

* build-aux/build-guile.sh: Support V=0,1,2.
This commit is contained in:
Jan Nieuwenhuizen 2018-07-21 12:02:43 +02:00
parent d769a3d3c1
commit f703598656
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 14 additions and 18 deletions

View File

@ -35,7 +35,7 @@ all: build doc
build: build:
./build.sh ./build.sh
cc: gcc:
build-aux/build-cc.sh build-aux/build-cc.sh
mes-gcc: mes-gcc:

View File

@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Mes. If not, see <http://www.gnu.org/licenses/>. # along with Mes. If not, see <http://www.gnu.org/licenses/>.
if [ -n "$BUILD_DEBUG" ]; then if [ "$V" = 2 ]; then
set -x set -x
fi fi
@ -45,6 +45,11 @@ module/mescc/mescc.scm
module/mescc/preprocess.scm module/mescc/preprocess.scm
" "
SCRIPTS="
build-aux/mes-snarf.scm
scripts/mescc
"
export srcdir=. export srcdir=.
export host=$($GUILE -c "(display %host-type)") export host=$($GUILE -c "(display %host-type)")
@ -52,24 +57,15 @@ if [ "$GUILE_EFFECTIVE_VERSION" = "2.0" ]; then
abs=$PWD/ abs=$PWD/
fi fi
#$GUILE --no-auto-compile -L guile -C guile -s build-aux/compile-all.scm $SCM_FILES GUILE_AUTO_COMPILE=0
[ -z "$V" -o "$V" = 1 ] && LOG='build.log' || LOG=/dev/stdout
for i in $SCM_FILES; do for i in $SCM_FILES $SCRIPTS; do
go=${i%%.scm}.go go=${i%%.scm}.go
if [ $i -nt $go ]; then if [ $i -nt $go ]; then
echo " GUILEC $i" [ -z "$V" -o "$V" = 1 ] && echo " GUILEC $i" || true
$GUILE_TOOLS compile -L ${abs}module -L ${abs}scripts -o $go $i [ "$V" = 1 ] && set -x
fi $GUILE_TOOLS compile -L ${abs}module -L ${abs}/build-aux -L ${abs}scripts -o $go $i >>$LOG
done { [ "$V" = 1 ] && set +x || true; } > /dev/null 2>&1
SCRIPTS="
scripts/mescc
"
for i in $SCRIPTS; do
go=${i%%.scm}.go
if [ $i -nt $go ]; then
echo " GUILEC $i"
$GUILE_TOOLS compile -L ${abs}module -L ${abs}scripts -o $go $i
fi fi
done done