]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make msginit work even before it is installed.
authorBruno Haible <bruno@clisp.org>
Tue, 4 Dec 2001 19:20:58 +0000 (19:20 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 21:33:20 +0000 (23:33 +0200)
po/ChangeLog
po/Rules-quot
src/ChangeLog
src/msginit.c

index 0c6db584ba66c98a057215d5891b70e7fada98bc..53f2e3fb6d6ad774155fee13826f0b088178615f 100644 (file)
@@ -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>.
index b0cbb7e3d34f015e74600cfb87aba3b481a4b108..9324c9c76fdfeb5f38e945f89d697b65607de5b4 100644 (file)
@@ -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/@.*//'`; \
index e659be43b4a356cecf3e43a67b693cf62bf0f0cc..4ffaa0e63422187f199d2b829f103f4aad45648d 100644 (file)
@@ -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.
index 2cdee8c6ce43c9cb86a7956c428cf68f12373d84..22ee36a13e08d460d62e9d194768f8bce3d68f17 100644 (file)
@@ -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;