diff options
author | dos-reis <gdr@axiomatics.org> | 2010-11-30 00:35:51 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-11-30 00:35:51 +0000 |
commit | cadd6f77df5ad2f93d1c494525db8a192bed87b5 (patch) | |
tree | 1662ed293232382d988bac5e9c2fea089ea80b07 /src/driver/main.c | |
parent | eadaa332441dbb0bbc710e4803cd73970859cc1f (diff) | |
download | open-axiom-cadd6f77df5ad2f93d1c494525db8a192bed87b5.tar.gz |
* 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.
Diffstat (limited to 'src/driver/main.c')
-rw-r--r-- | src/driver/main.c | 11 |
1 files changed, 7 insertions, 4 deletions
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: |