From 4bfce3b6e2ea095ea3d9f5d2d1018cc0a1e5ce09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20K=C3=BChling?= Date: Sat, 18 Sep 2010 20:47:21 +0200 Subject: Major overhaul and cleanup. Support for .ubi image file installations. Only compile&install a minimum host Gforth for bootstrapping the target Gforth, removing strange emacs-dependencies that cropped up earlier. Image file can now be built on the nanonote using 'gforth-update-image' command. Also, Gforth is now run through a wrapper that calls 'gforth-update-image' automatically, if necessary. Also first attempts at supporting libcc C-interface libraries pre-compiled on the host. Tested to compile on amd64 and i386. --- gforth/files/gforth-wrapper.in | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 gforth/files/gforth-wrapper.in (limited to 'gforth/files/gforth-wrapper.in') diff --git a/gforth/files/gforth-wrapper.in b/gforth/files/gforth-wrapper.in new file mode 100644 index 0000000..3bc7d35 --- /dev/null +++ b/gforth/files/gforth-wrapper.in @@ -0,0 +1,50 @@ +#! /bin/sh +# +# Part of gforth package for OpenWrt: Wrapper to call check for and create +# Gforth image before running executable. +# +# Copyright (C) 2010 David Kuehling +# +# License: GPLv3+, NO WARRANTY +# +dirname=$(dirname "$0") +binary=$dirname/$(basename "$0").real + +GFORTH_LIB_DIR=/usr/lib/gforth/@PACKAGE_VERSION@ +GFORTH_FI=$GFORTH_LIB_DIR/gforth.fi + +# try to (re)generate the gforth.fi image file +do_update(){ + $dirname/gforth-update-image &> /dev/null + status=$? + [ $status = 0 ] && return 0 + +cat< + and/or . + + As a workaround, you can run a kernel-only Gforth + (with reduced functionality), using: + + $binary -i @kernel_fi@ +EOF + + exec false +} + +if ! [ -f "$GFORTH_FI" ]; then + do_update +fi + +# if everything is ok, we'll come here and run the actual Gforth executable +# (gforth.real, gforth-fast.real etc.) +exec "$binary" "$@" + -- cgit v1.2.3