aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac2
-rw-r--r--src/ChangeLog11
-rw-r--r--src/boot/translator.boot3
-rw-r--r--src/driver/main.c11
-rw-r--r--src/driver/utils.c26
-rw-r--r--src/driver/utils.h3
-rw-r--r--src/etc/Makefile.in5
8 files changed, 62 insertions, 19 deletions
diff --git a/configure b/configure
index 34702c27..b35db3a9 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for OpenAxiom 1.4.0-2010-11-28.
+# Generated by GNU Autoconf 2.65 for OpenAxiom 1.4.0-2010-11-29.
#
# Report bugs to <open-axiom-bugs@lists.sf.net>.
#
@@ -701,8 +701,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='OpenAxiom'
PACKAGE_TARNAME='openaxiom'
-PACKAGE_VERSION='1.4.0-2010-11-28'
-PACKAGE_STRING='OpenAxiom 1.4.0-2010-11-28'
+PACKAGE_VERSION='1.4.0-2010-11-29'
+PACKAGE_STRING='OpenAxiom 1.4.0-2010-11-29'
PACKAGE_BUGREPORT='open-axiom-bugs@lists.sf.net'
PACKAGE_URL=''
@@ -1491,7 +1491,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenAxiom 1.4.0-2010-11-28 to adapt to many kinds of systems.
+\`configure' configures OpenAxiom 1.4.0-2010-11-29 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1566,7 +1566,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-11-28:";;
+ short | recursive ) echo "Configuration of OpenAxiom 1.4.0-2010-11-29:";;
esac
cat <<\_ACEOF
@@ -1677,7 +1677,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenAxiom configure 1.4.0-2010-11-28
+OpenAxiom configure 1.4.0-2010-11-29
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2569,7 +2569,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenAxiom $as_me 1.4.0-2010-11-28, which was
+It was created by OpenAxiom $as_me 1.4.0-2010-11-29, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -5468,7 +5468,7 @@ fi
# Define the identity of the package.
PACKAGE='openaxiom'
- VERSION='1.4.0-2010-11-28'
+ VERSION='1.4.0-2010-11-29'
cat >>confdefs.h <<_ACEOF
@@ -20961,7 +20961,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenAxiom $as_me 1.4.0-2010-11-28, which was
+This file was extended by OpenAxiom $as_me 1.4.0-2010-11-29, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21027,7 +21027,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-OpenAxiom config.status 1.4.0-2010-11-28
+OpenAxiom config.status 1.4.0-2010-11-29
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 298e8526..e9d7a583 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ dnl Makefiles for building OpenAxiom interpreter, compiler, libraries, and
dnl auxiliary tools where appropriate.
dnl
-AC_INIT([OpenAxiom], [1.4.0-2010-11-28],
+AC_INIT([OpenAxiom], [1.4.0-2010-11-29],
[open-axiom-bugs@lists.sf.net])
dnl Most of the macros used in this configure.ac are defined in files
diff --git a/src/ChangeLog b/src/ChangeLog
index db11d90f..b106343c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-29 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * etc/Makefile.in: Use the driver.
+ * driver/utils.c (get_suffix): New.
+ (option_value): Likewise.
+ (preprocess_arguments): Handle --translate and --build-databases.
+ * driver/main.c (upgrade_environment): Change argument type to
+ Command. Upgrade LD_LIBRARY_PATH too.
+ * boot/translator.boot (loadSystemRuntimeCore): Don't prefix the
+ shared library file name with the system path.
+
2010-11-28 Gabriel Dos Reis <gdr@cs.tamu.edu>
* clef/: Add using directive at toplevel.
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index 191d958b..046b1f43 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.boot
@@ -783,5 +783,4 @@ loadNativeModule m ==
loadSystemRuntimeCore() ==
%hasFeature KEYWORD::ECL or %hasFeature KEYWORD::GCL => nil
- loadNativeModule strconc(systemLibraryDirectory(),
- '"libopen-axiom-core",$NativeModuleExt)
+ loadNativeModule strconc('"libopen-axiom-core",$NativeModuleExt)
diff --git a/src/driver/main.c b/src/driver/main.c
index 3dd06ebe..1436d42c 100644
--- a/src/driver/main.c
+++ b/src/driver/main.c
@@ -79,13 +79,16 @@ namespace OpenAxiom {
}
static void
- upgrade_environment(const char* sysdir) {
+ upgrade_environment(const Command* command) {
+ const char* sysdir = command->root_dir;
augment_variable("TEXINPUTS",
oa_concatenate_string(sysdir, OPENAXIOM_TEXINPUTS_PATH));
augment_variable("BIBINPUTS",
oa_concatenate_string(sysdir, OPENAXIOM_BIBINPUTS_PATH));
- augment_variable("LD_LIBRARY_PATH",
- oa_concatenate_string(sysdir, "/lib"));
+ const char* ldd_path = option_value(command, "--syslib");
+ if (ldd_path == 0)
+ ldd_path = oa_concatenate_string(sysdir, "/lib");
+ augment_variable("LD_LIBRARY_PATH", ldd_path);
publish_systemdir(sysdir);
}
@@ -115,7 +118,7 @@ main(int argc, char* argv[])
using namespace OpenAxiom;
Command command;
Driver driver = preprocess_arguments(&command, argc, argv);
- upgrade_environment(command.root_dir);
+ upgrade_environment(&command);
switch (driver) {
case null_driver:
diff --git a/src/driver/utils.c b/src/driver/utils.c
index 42b0183d..89e1ad4c 100644
--- a/src/driver/utils.c
+++ b/src/driver/utils.c
@@ -86,6 +86,14 @@ namespace OpenAxiom {
exec_path()
{ }
+ static const char*
+ get_suffix(const char* first, const char* last, const char* seq) {
+ for (; first < last; ++first, ++seq)
+ if (*first != *seq)
+ return 0;
+ return seq;
+ }
+
// -- Return non-null if `lhs' is a prefix of `rhs'. When non-null
// -- the pointer points to the '=' character that starts of the
// -- value supplied to the argument.
@@ -97,6 +105,21 @@ namespace OpenAxiom {
return rhs + N - 1;
}
+ const char*
+ option_value(const Command* command, const char* opt) {
+ const int n = strlen(opt);
+ for (int i = 1; i < command->core.argc; ++i) {
+ const char* arg = command->core.argv[i];
+ if (strlen(arg) < n)
+ continue;
+ if(const char* val = get_suffix(opt, opt + n, arg)) {
+ if (*val++ == '=')
+ return val;
+ break;
+ }
+ }
+ return 0;
+ }
/* Return a path to the running system, either as specified on command
line through --system=, or as specified at configuration time. */
@@ -311,7 +334,8 @@ preprocess_arguments(Command* command, int argc, char** argv)
if (strcmp(argv[i], "--script") == 0)
driver = script_driver;
else if(strcmp(argv[i], "--compile") == 0
- or strcmp(argv[i], "--translate") == 0)
+ or strcmp(argv[i], "--translate") == 0
+ or strcmp(argv[i], "--build-databases") == 0)
driver = compiler_driver;
else if (strcmp(argv[i], "--make") == 0)
driver = linker_driver;
diff --git a/src/driver/utils.h b/src/driver/utils.h
index 10f47f79..6c55f1c0 100644
--- a/src/driver/utils.h
+++ b/src/driver/utils.h
@@ -93,6 +93,9 @@ namespace OpenAxiom {
const char* get_systemdir(int argc, char*[]);
const char* make_path_for(const char*, Driver);
+ // Return a pointer the string value associated with an option.
+ const char* option_value(const Command*, const char*);
+
int execute_core(const Command*, Driver);
void build_rts_options(Command*, Driver);
diff --git a/src/etc/Makefile.in b/src/etc/Makefile.in
index 6052ffb7..1d2c05a5 100644
--- a/src/etc/Makefile.in
+++ b/src/etc/Makefile.in
@@ -29,8 +29,11 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+DRIVER = ../driver/open-axiom$(EXEEX)
-INTERPSYS = ../interp/interpsys$(EXEEXT) -- --system="$(AXIOM)" \
+INTERPSYS = \
+ $(DRIVER) --execpath=../interp/interpsys$(EXEEXT) \
+ --system="$(AXIOM)" \
--sysalg="$(axiom_src_datadir)/algebra/"
openaxiom_databases = \