>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:

Angus> Jean-Marc Lasgouttes wrote:
>> To fix 2/ properly, I see two radically different solutions:

>> a) set POSIXLY_CORRECT before invoking awk, so that gawk is in
>> POSIX mode and we can use the second gsub flavour.

Angus> I think that an app that conforms to POSIX has at least some
Angus> chance of working in a multi-platform world. How much work
Angus> would it be to ensure that we use POSIX regexes?

OK, people who have problems with gawk, could you try the following
patch?

JMarc

Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.1023
diff -u -p -r1.1023 ChangeLog
--- ChangeLog	18 Jul 2005 15:49:56 -0000	1.1023
+++ ChangeLog	12 Sep 2005 14:38:06 -0000
@@ -1,3 +1,8 @@
+2005-09-12  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* configure.ac: check for AWK and use --posix option if we found
+	gawk.
+
 2005-07-18  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
 	* configure.ac: version back to 1.4.0cvs 
Index: configure.ac
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v
retrieving revision 1.58
diff -u -p -r1.58 configure.ac
--- configure.ac	18 Jul 2005 15:49:57 -0000	1.58
+++ configure.ac	12 Sep 2005 14:38:06 -0000
@@ -31,7 +31,8 @@ done
 AC_PROG_MAKE_SET
 AC_PROG_INSTALL
 
-AC_SUBST(AWK,[gawk])
+AC_PROG_AWK
+test "$AWK" = gawk && AWK="gawk --posix"
 
 #AC_PROG_RANLIB
 AC_CHECK_PROG(KPSEWHICH, kpsewhich, kpsewhich, :)
Index: po/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/po/ChangeLog,v
retrieving revision 1.229
diff -u -p -r1.229 ChangeLog
--- po/ChangeLog	8 Sep 2005 16:57:13 -0000	1.229
+++ po/ChangeLog	12 Sep 2005 14:38:06 -0000
@@ -1,3 +1,7 @@
+2005-09-12  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* Makefile.in.in: when invoking awk, use POSIX regexps only.
+
 2005-09-08  Martin Vermeer  <[EMAIL PROTECTED]>
 
 	* he.po: move enum, appendix counter functionality here
Index: po/Makefile.in.in
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/po/Makefile.in.in,v
retrieving revision 1.51
diff -u -p -r1.51 Makefile.in.in
--- po/Makefile.in.in	15 Jul 2005 18:58:17 -0000	1.51
+++ po/Makefile.in.in	12 Sep 2005 14:38:06 -0000
@@ -446,8 +446,8 @@ layouts_l10n.pot: $(top_srcdir)/lib/layo
 		/LabelString[A-Za-z]*/ { \
 			line=$$0; \
 			sub(/[[:space:]]*LabelString[A-Za-z]*[[:space:]]*/, "", line); \
-			gsub(/"/, "", line); \
-			gsub(/\\/, "\\\\", line); \
+			gsub(/\"/, "", line); \
+			gsub(/\/, "\\\\", line); \
 			if (line != "") \
 			  printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
 				 fixupfilename(), FNR, line); \
@@ -455,14 +455,14 @@ layouts_l10n.pot: $(top_srcdir)/lib/layo
 		/GuiName/ { \
 			line=$$0; \
 			sub(/[[:space:]]*GuiName[[:space:]]*/, "", line); \
-			gsub(/"/, "", line); \
+			gsub(/\"/, "", line); \
 			printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
 				fixupfilename(), FNR, line); \
 		} \
 		/ListName/ { \
 			line=$$0; \
 			sub(/[[:space:]]*ListName[[:space:]]*/, "", line); \
-			gsub(/"/, "", line); \
+			gsub(/\"/, "", line); \
 			printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \
 				fixupfilename(), FNR, line); \
 		}' \

Reply via email to