diff options
-rw-r--r-- | acinclude.m4 | 2 | ||||
-rw-r--r-- | configure.in | 19 | ||||
-rw-r--r-- | sql/share/Makefile.am | 8 |
3 files changed, 22 insertions, 7 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 5f3020264fe..da817a179a7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -837,7 +837,7 @@ AC_DEFUN([MYSQL_TOP_BUILDDIR], [ /* ) ;; # already an absolute path * ) [$1]="'\$(top_builddir)/'$[$1]" ;; esac - if X"$[$1]" != "/" + if test X"$[$1]" != "/" then [$1]=`echo $[$1] | sed -e 's,/$,,'` fi diff --git a/configure.in b/configure.in index 51ca0f2947a..fcbbde93efc 100644 --- a/configure.in +++ b/configure.in @@ -30,6 +30,18 @@ czech danish dutch english estonian french german greek hungarian \ italian japanese korean norwegian norwegian-ny polish portuguese \ romanian russian slovak spanish swedish" +# Generate make rules for all error messages +AVAILABLE_LANGUAGES_ERRORS= +AVAILABLE_LANGUAGES_ERRORS_RULES=$srcdir/ac_available_languages_fragment +rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES +for i in $AVAILABLE_LANGUAGES +do + AVAILABLE_LANGUAGES_ERRORS="$AVAILABLE_LANGUAGES_ERRORS $i/errmsg.sys" + echo "$i/errmsg.sys: $i/errmsg.txt + \$(top_srdir)/extra/comp_err $i/errmsg.txt $i/errmsg.sys" \ + >> $AVAILABLE_LANGUAGES_ERRORS_RULES +done + ##### ##### @@ -42,6 +54,8 @@ AC_SUBST(DOT_FRM_VERSION) AC_DEFINE_UNQUOTED(DOT_FRM_VERSION, $DOT_FRM_VERSION) AC_SUBST(SHARED_LIB_VERSION) AC_SUBST(AVAILABLE_LANGUAGES) +AC_SUBST(AVAILABLE_LANGUAGES_ERRORS) +AC_SUBST_FILE(AVAILABLE_LANGUAGES_ERRORS_RULES) # Canonicalize the configuration name. SYSTEM_TYPE="$host_vendor-$host_os" @@ -1911,7 +1925,10 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile \ tests/Makefile Docs/Makefile support-files/Makefile \ mysql-test/Makefile \ include/mysql_version.h - , , [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h]) + , , [ + test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h + rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES + ]) echo echo "MySQL has a Web site at http://www.mysql.com/ which carries details on the" diff --git a/sql/share/Makefile.am b/sql/share/Makefile.am index e662c4f09a2..2f1440597dc 100644 --- a/sql/share/Makefile.am +++ b/sql/share/Makefile.am @@ -1,16 +1,14 @@ ## Process this file with automake to create Makefile.in -ERRMSG=$(patsubst %, %/errmsg.sys, @AVAILABLE_LANGUAGES@) - # This requires gnu cp at distribution time. dist-hook: for lang in @AVAILABLE_LANGUAGES@ charsets; \ do cp -a $(srcdir)/$$lang $(distdir); done -all: $(ERRMSG) +all: @AVAILABLE_LANGUAGES_ERRORS@ -$(ERRMSG): %.sys: %.txt - ../../extra/comp_err $< $@ +# this is ugly, but portable +@AVAILABLE_LANGUAGES_ERRORS_RULES@ install-data-local: for lang in @AVAILABLE_LANGUAGES@; \ |