summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--po/ChangeLog5
-rw-r--r--po/Rules-quot2
-rw-r--r--src/ChangeLog6
-rw-r--r--src/msginit.c18
4 files changed, 28 insertions, 3 deletions
diff --git a/po/ChangeLog b/po/ChangeLog
index 0c6db58..53f2e3f 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-01 Bruno Haible <bruno@clisp.org>
+
+ * Rules-quot (.insert-header.po-update-en): Set the GETTEXTLIBDIR
+ environment variable, so that msginit finds its project-id script.
+
2001-12-03 Bruno Haible <bruno@clisp.org>
* ko.po: Update from Changwoo Ryu <cwryu@debian.org>.
diff --git a/po/Rules-quot b/po/Rules-quot
index b0cbb7e..9324c9c 100644
--- a/po/Rules-quot
+++ b/po/Rules-quot
@@ -9,7 +9,7 @@ en@boldquot.po-update: en@boldquot.po-update-en
.insert-header.po-update-en:
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
- if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=$(top_srcdir)/src; export GETTEXTLIBDIR; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
ll=`echo $$lang | sed -e 's/@.*//'`; \
diff --git a/src/ChangeLog b/src/ChangeLog
index e659be4..4ffaa0e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2001-12-01 Bruno Haible <bruno@clisp.org>
+
+ * msginit.c (project_id): Make it possible to specify the location
+ of the project-id script through an environment variable.
+ (project_id_version): Likewise.
+
2001-12-03 Tommy Johansson <tommy.johansson@kanalen.org>
* x-java.l (tailcmp): New function.
diff --git a/src/msginit.c b/src/msginit.c
index 2cdee8c..22ee36a 100644
--- a/src/msginit.c
+++ b/src/msginit.c
@@ -865,7 +865,8 @@ englishname_of_language ()
static const char *
project_id ()
{
- char *prog = concatenated_pathname (LIBDIR, "gettext/project-id", NULL);
+ char *gettextlibdir;
+ char *prog;
char *argv[3];
pid_t child;
int fd[1];
@@ -875,6 +876,12 @@ project_id ()
size_t linelen;
int exitstatus;
+ gettextlibdir = getenv ("GETTEXTLIBDIR");
+ if (gettextlibdir == NULL || gettextlibdir[0] == '\0')
+ gettextlibdir = concatenated_pathname (LIBDIR, "gettext", NULL);
+
+ prog = concatenated_pathname (gettextlibdir, "project-id", NULL);
+
/* Call the project-id shell script. */
argv[0] = "/bin/sh";
argv[1] = prog;
@@ -909,7 +916,8 @@ project_id ()
static const char *
project_id_version ()
{
- char *prog = concatenated_pathname (LIBDIR, "gettext/project-id", NULL);
+ char *gettextlibdir;
+ char *prog;
char *argv[4];
pid_t child;
int fd[1];
@@ -919,6 +927,12 @@ project_id_version ()
size_t linelen;
int exitstatus;
+ gettextlibdir = getenv ("GETTEXTLIBDIR");
+ if (gettextlibdir == NULL || gettextlibdir[0] == '\0')
+ gettextlibdir = concatenated_pathname (LIBDIR, "gettext", NULL);
+
+ prog = concatenated_pathname (gettextlibdir, "project-id", NULL);
+
/* Call the project-id shell script. */
argv[0] = "/bin/sh";
argv[1] = prog;