From 5dd82f5c6249f4666d7fae71b0f25a9ee6318ead Mon Sep 17 00:00:00 2001 From: hanwen Date: Mon, 1 May 2006 12:49:59 +0000 Subject: [PATCH] (framework_relocation): use INSTALLER_PREFIX. --- ChangeLog | 2 ++ lily/include/relocate.hh | 5 +++++ lily/relocate.cc | 10 +++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 219363435a..598c548caa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2006-05-01 Han-Wen Nienhuys + * lily/relocate.cc (framework_relocation): use INSTALLER_PREFIX. + * *.py: more 4 space indents. * autogen.sh (conf_flags): set sensible default for with-ncsb-dir diff --git a/lily/include/relocate.hh b/lily/include/relocate.hh index 77929598e4..e3af270a88 100644 --- a/lily/include/relocate.hh +++ b/lily/include/relocate.hh @@ -12,6 +12,11 @@ #include "std-string.hh" +void read_relocation_dir (string dirname); +void read_relocation_file (string filename); +string read_line (FILE *f); +string expand_environment_variables (string orig); + int sane_putenv (char const *key, string value, bool overwrite); void setup_paths (char const *argv0); extern bool relocate_binary; diff --git a/lily/relocate.cc b/lily/relocate.cc index 64092fcc88..34b7962a1a 100644 --- a/lily/relocate.cc +++ b/lily/relocate.cc @@ -120,12 +120,13 @@ framework_relocation (string prefix) if (be_verbose_global) warning (_f ("Relocation: framework_prefix=%s", prefix)); - sane_putenv ("INSTALLER_ROOT", prefix, true); + sane_putenv ("INSTALLER_PREFIX", prefix, true); read_relocation_dir (prefix + "/etc/relocate/"); -#ifdef OLD_RELOCATION string bindir = prefix + "/bin"; + +#ifdef OLD_RELOCATION string datadir = prefix + "/share"; string libdir = prefix + "/lib"; string sysconfdir = prefix + "/etc"; @@ -377,6 +378,9 @@ read_line (FILE *f) void read_relocation_file (string filename) { + if (be_verbose_global) + progress_indication (_f ("Relocation file %s", filename.c_str ())); + char const *cname = filename.c_str (); FILE *f = fopen (cname, "r"); if (!f) @@ -426,7 +430,7 @@ read_relocation_dir (string dirname) File_name name (ent->d_name); if (name.ext_ == "reloc") { - read_relocation_file (name.to_string ()); + read_relocation_file (dirname + "/" + name.to_string ()); } } } -- 2.39.5