From 22f2a38919a7df625532494bf1a35884bfc791e1 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 20 Dec 2005 00:18:07 +0000 Subject: [PATCH] (setup_paths): fix: LILYPOND_RELOCATE_PREFIX. (main): read LILYPOND_VERBOSE as the first thing. --- ChangeLog | 3 +++ lily/main.cc | 22 +++++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9cde745109..a0c6d7427c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-12-20 Han-Wen Nienhuys + * lily/main.cc (setup_paths): fix: LILYPOND_RELOCATE_PREFIX. + (main): read LILYPOND_VERBOSE as the first thing. + * stepmake/aclocal.m4: remove INSTALL variable. * GNUmakefile.in ($(tree-share-prefix)/mf-link-tree link-mf-tree): diff --git a/lily/main.cc b/lily/main.cc index 65b4f396a6..f770d59854 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -390,11 +390,18 @@ setup_paths (char const *argv0) { prefix_directory = LILYPOND_DATADIR; - if (relocate_binary) + + if (relocate_binary + && getenv ("LILYPOND_RELOCATE_PREFIX")) + { + String prefix = getenv ("LILYPOND_RELOCATE_PREFIX"); + /* + fixme: need different sep for mingw? + */ + set_relocation (prefix + "/bin", prefix); + } + else if (relocate_binary) { - if (getenv ("LILYPOND_VERBOSE")) - be_verbose_global = true; - #if defined (__CYGWIN__) || defined (__MINGW32__) String s = argv0; s.substitute ('\\', '/'); @@ -404,9 +411,7 @@ setup_paths (char const *argv0) /* if name contains slashes, we should not look in $PATH */ String argv0_abs; - if (getenv ("LILYPOND_RELOCATE_PREFIX")) - argv0_abs = getenv ("LILYPOND_RELOCATE_PREFIX"); - else if (argv0[0] == '/') + if (argv0[0] == '/') argv0_abs = argv0_abs; else if (String (argv0).index ('/') > 0) argv0_abs = get_working_directory () + "/" + String (argv0); @@ -827,6 +832,9 @@ setup_guile_env () int main (int argc, char **argv) { + if (getenv ("LILYPOND_VERBOSE")) + be_verbose_global = true; + setup_localisation (); parse_argv (argc, argv); if (isatty (STDIN_FILENO)) -- 2.39.2