po.m4 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. # po.m4 serial 3 (gettext-0.14)
  2. dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
  3. dnl This file is free software, distributed under the terms of the GNU
  4. dnl General Public License. As a special exception to the GNU General
  5. dnl Public License, this file may be distributed as part of a program
  6. dnl that contains a configuration script generated by Autoconf, under
  7. dnl the same distribution terms as the rest of that program.
  8. dnl
  9. dnl This file can can be used in projects which are not available under
  10. dnl the GNU General Public License or the GNU Library General Public
  11. dnl License but which still want to provide support for the GNU gettext
  12. dnl functionality.
  13. dnl Please note that the actual code of the GNU gettext library is covered
  14. dnl by the GNU Library General Public License, and the rest of the GNU
  15. dnl gettext package package is covered by the GNU General Public License.
  16. dnl They are *not* in the public domain.
  17. dnl Authors:
  18. dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
  19. dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
  20. dnl Checks for all prerequisites of the po subdirectory.
  21. AC_DEFUN([AM_PO_SUBDIRS],
  22. [
  23. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  24. AC_REQUIRE([AC_PROG_INSTALL])dnl
  25. AC_REQUIRE([AM_MKINSTALLDIRS])dnl
  26. AC_REQUIRE([AM_NLS])dnl
  27. dnl Perform the following tests also if --disable-nls has been given,
  28. dnl because they are needed for "make dist" to work.
  29. dnl Search for GNU msgfmt in the PATH.
  30. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
  31. dnl The second test excludes FreeBSD msgfmt.
  32. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
  33. [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
  34. (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
  35. :)
  36. AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
  37. dnl Search for GNU xgettext 0.12 or newer in the PATH.
  38. dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
  39. dnl The second test excludes FreeBSD xgettext.
  40. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
  41. [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
  42. (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
  43. :)
  44. dnl Remove leftover from FreeBSD xgettext call.
  45. rm -f messages.po
  46. dnl Search for GNU msgmerge 0.11 or newer in the PATH.
  47. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
  48. [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
  49. dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
  50. dnl Test whether we really found GNU msgfmt.
  51. if test "$GMSGFMT" != ":"; then
  52. dnl If it is no GNU msgfmt we define it as : so that the
  53. dnl Makefiles still can work.
  54. if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
  55. (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
  56. : ;
  57. else
  58. GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
  59. AC_MSG_RESULT(
  60. [found $GMSGFMT program is not GNU msgfmt; ignore it])
  61. GMSGFMT=":"
  62. fi
  63. fi
  64. dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
  65. dnl Test whether we really found GNU xgettext.
  66. if test "$XGETTEXT" != ":"; then
  67. dnl If it is no GNU xgettext we define it as : so that the
  68. dnl Makefiles still can work.
  69. if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
  70. (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
  71. : ;
  72. else
  73. AC_MSG_RESULT(
  74. [found xgettext program is not GNU xgettext; ignore it])
  75. XGETTEXT=":"
  76. fi
  77. dnl Remove leftover from FreeBSD xgettext call.
  78. rm -f messages.po
  79. fi
  80. AC_OUTPUT_COMMANDS([
  81. for ac_file in $CONFIG_FILES; do
  82. # Support "outfile[:infile[:infile...]]"
  83. case "$ac_file" in
  84. *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  85. esac
  86. # PO directories have a Makefile.in generated from Makefile.in.in.
  87. case "$ac_file" in */Makefile.in)
  88. # Adjust a relative srcdir.
  89. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
  90. ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
  91. ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
  92. # In autoconf-2.13 it is called $ac_given_srcdir.
  93. # In autoconf-2.50 it is called $srcdir.
  94. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
  95. case "$ac_given_srcdir" in
  96. .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
  97. /*) top_srcdir="$ac_given_srcdir" ;;
  98. *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
  99. esac
  100. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
  101. rm -f "$ac_dir/POTFILES"
  102. test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
  103. cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
  104. POMAKEFILEDEPS="POTFILES.in"
  105. # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
  106. # on $ac_dir but don't depend on user-specified configuration
  107. # parameters.
  108. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
  109. # The LINGUAS file contains the set of available languages.
  110. if test -n "$OBSOLETE_ALL_LINGUAS"; then
  111. test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
  112. fi
  113. ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
  114. # Hide the ALL_LINGUAS assigment from automake.
  115. eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
  116. POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
  117. else
  118. # The set of available languages was given in configure.in.
  119. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
  120. fi
  121. # Compute POFILES
  122. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
  123. # Compute UPDATEPOFILES
  124. # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
  125. # Compute DUMMYPOFILES
  126. # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
  127. # Compute GMOFILES
  128. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
  129. case "$ac_given_srcdir" in
  130. .) srcdirpre= ;;
  131. *) srcdirpre='$(srcdir)/' ;;
  132. esac
  133. POFILES=
  134. UPDATEPOFILES=
  135. DUMMYPOFILES=
  136. GMOFILES=
  137. for lang in $ALL_LINGUAS; do
  138. POFILES="$POFILES $srcdirpre$lang.po"
  139. UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
  140. DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
  141. GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
  142. done
  143. # CATALOGS depends on both $ac_dir and the user's LINGUAS
  144. # environment variable.
  145. INST_LINGUAS=
  146. if test -n "$ALL_LINGUAS"; then
  147. for presentlang in $ALL_LINGUAS; do
  148. useit=no
  149. if test "%UNSET%" != "$LINGUAS"; then
  150. desiredlanguages="$LINGUAS"
  151. else
  152. desiredlanguages="$ALL_LINGUAS"
  153. fi
  154. for desiredlang in $desiredlanguages; do
  155. # Use the presentlang catalog if desiredlang is
  156. # a. equal to presentlang, or
  157. # b. a variant of presentlang (because in this case,
  158. # presentlang can be used as a fallback for messages
  159. # which are not translated in the desiredlang catalog).
  160. case "$desiredlang" in
  161. "$presentlang"*) useit=yes;;
  162. esac
  163. done
  164. if test $useit = yes; then
  165. INST_LINGUAS="$INST_LINGUAS $presentlang"
  166. fi
  167. done
  168. fi
  169. CATALOGS=
  170. if test -n "$INST_LINGUAS"; then
  171. for lang in $INST_LINGUAS; do
  172. CATALOGS="$CATALOGS $lang.gmo"
  173. done
  174. fi
  175. test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
  176. sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
  177. for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
  178. if test -f "$f"; then
  179. case "$f" in
  180. *.orig | *.bak | *~) ;;
  181. *) cat "$f" >> "$ac_dir/Makefile" ;;
  182. esac
  183. fi
  184. done
  185. fi
  186. ;;
  187. esac
  188. done],
  189. [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
  190. # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
  191. # from automake.
  192. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
  193. # Capture the value of LINGUAS because we need it to compute CATALOGS.
  194. LINGUAS="${LINGUAS-%UNSET%}"
  195. ])
  196. ])
  197. dnl Postprocesses a Makefile in a directory containing PO files.
  198. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
  199. [
  200. # When this code is run, in config.status, two variables have already been
  201. # set:
  202. # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
  203. # - LINGUAS is the value of the environment variable LINGUAS at configure
  204. # time.
  205. changequote(,)dnl
  206. # Adjust a relative srcdir.
  207. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
  208. ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
  209. ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
  210. # In autoconf-2.13 it is called $ac_given_srcdir.
  211. # In autoconf-2.50 it is called $srcdir.
  212. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
  213. case "$ac_given_srcdir" in
  214. .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
  215. /*) top_srcdir="$ac_given_srcdir" ;;
  216. *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
  217. esac
  218. # Find a way to echo strings without interpreting backslash.
  219. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
  220. gt_echo='echo'
  221. else
  222. if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
  223. gt_echo='printf %s\n'
  224. else
  225. echo_func () {
  226. cat <<EOT
  227. $*
  228. EOT
  229. }
  230. gt_echo='echo_func'
  231. fi
  232. fi
  233. # A sed script that extracts the value of VARIABLE from a Makefile.
  234. sed_x_variable='
  235. # Test if the hold space is empty.
  236. x
  237. s/P/P/
  238. x
  239. ta
  240. # Yes it was empty. Look if we have the expected variable definition.
  241. /^[ ]*VARIABLE[ ]*=/{
  242. # Seen the first line of the variable definition.
  243. s/^[ ]*VARIABLE[ ]*=//
  244. ba
  245. }
  246. bd
  247. :a
  248. # Here we are processing a line from the variable definition.
  249. # Remove comment, more precisely replace it with a space.
  250. s/#.*$/ /
  251. # See if the line ends in a backslash.
  252. tb
  253. :b
  254. s/\\$//
  255. # Print the line, without the trailing backslash.
  256. p
  257. tc
  258. # There was no trailing backslash. The end of the variable definition is
  259. # reached. Clear the hold space.
  260. s/^.*$//
  261. x
  262. bd
  263. :c
  264. # A trailing backslash means that the variable definition continues in the
  265. # next line. Put a nonempty string into the hold space to indicate this.
  266. s/^.*$/P/
  267. x
  268. :d
  269. '
  270. changequote([,])dnl
  271. # Set POTFILES to the value of the Makefile variable POTFILES.
  272. sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
  273. POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
  274. # Compute POTFILES_DEPS as
  275. # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
  276. POTFILES_DEPS=
  277. for file in $POTFILES; do
  278. POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
  279. done
  280. POMAKEFILEDEPS=""
  281. if test -n "$OBSOLETE_ALL_LINGUAS"; then
  282. test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
  283. fi
  284. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
  285. # The LINGUAS file contains the set of available languages.
  286. ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
  287. POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
  288. else
  289. # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
  290. sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
  291. ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
  292. fi
  293. # Hide the ALL_LINGUAS assigment from automake.
  294. eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
  295. # Compute POFILES
  296. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
  297. # Compute UPDATEPOFILES
  298. # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
  299. # Compute DUMMYPOFILES
  300. # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
  301. # Compute GMOFILES
  302. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
  303. # Compute PROPERTIESFILES
  304. # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
  305. # Compute CLASSFILES
  306. # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
  307. # Compute QMFILES
  308. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
  309. # Compute MSGFILES
  310. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
  311. # Compute RESOURCESDLLFILES
  312. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
  313. case "$ac_given_srcdir" in
  314. .) srcdirpre= ;;
  315. *) srcdirpre='$(srcdir)/' ;;
  316. esac
  317. POFILES=
  318. UPDATEPOFILES=
  319. DUMMYPOFILES=
  320. GMOFILES=
  321. PROPERTIESFILES=
  322. CLASSFILES=
  323. QMFILES=
  324. MSGFILES=
  325. RESOURCESDLLFILES=
  326. for lang in $ALL_LINGUAS; do
  327. POFILES="$POFILES $srcdirpre$lang.po"
  328. UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
  329. DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
  330. GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
  331. PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
  332. CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
  333. QMFILES="$QMFILES $srcdirpre$lang.qm"
  334. frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
  335. MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
  336. frobbedlang=`echo $lang | sed -e 's/_/-/g'`
  337. RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
  338. done
  339. # CATALOGS depends on both $ac_dir and the user's LINGUAS
  340. # environment variable.
  341. INST_LINGUAS=
  342. if test -n "$ALL_LINGUAS"; then
  343. for presentlang in $ALL_LINGUAS; do
  344. useit=no
  345. if test "%UNSET%" != "$LINGUAS"; then
  346. desiredlanguages="$LINGUAS"
  347. else
  348. desiredlanguages="$ALL_LINGUAS"
  349. fi
  350. for desiredlang in $desiredlanguages; do
  351. # Use the presentlang catalog if desiredlang is
  352. # a. equal to presentlang, or
  353. # b. a variant of presentlang (because in this case,
  354. # presentlang can be used as a fallback for messages
  355. # which are not translated in the desiredlang catalog).
  356. case "$desiredlang" in
  357. "$presentlang"*) useit=yes;;
  358. esac
  359. done
  360. if test $useit = yes; then
  361. INST_LINGUAS="$INST_LINGUAS $presentlang"
  362. fi
  363. done
  364. fi
  365. CATALOGS=
  366. JAVACATALOGS=
  367. QTCATALOGS=
  368. TCLCATALOGS=
  369. CSHARPCATALOGS=
  370. if test -n "$INST_LINGUAS"; then
  371. for lang in $INST_LINGUAS; do
  372. CATALOGS="$CATALOGS $lang.gmo"
  373. JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
  374. QTCATALOGS="$QTCATALOGS $lang.qm"
  375. frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
  376. TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
  377. frobbedlang=`echo $lang | sed -e 's/_/-/g'`
  378. CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
  379. done
  380. fi
  381. sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
  382. if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
  383. # Add dependencies that cannot be formulated as a simple suffix rule.
  384. for lang in $ALL_LINGUAS; do
  385. frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
  386. cat >> "$ac_file.tmp" <<EOF
  387. $frobbedlang.msg: $lang.po
  388. @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
  389. \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
  390. EOF
  391. done
  392. fi
  393. if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
  394. # Add dependencies that cannot be formulated as a simple suffix rule.
  395. for lang in $ALL_LINGUAS; do
  396. frobbedlang=`echo $lang | sed -e 's/_/-/g'`
  397. cat >> "$ac_file.tmp" <<EOF
  398. $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
  399. @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
  400. \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
  401. EOF
  402. done
  403. fi
  404. if test -n "$POMAKEFILEDEPS"; then
  405. cat >> "$ac_file.tmp" <<EOF
  406. Makefile: $POMAKEFILEDEPS
  407. EOF
  408. fi
  409. mv "$ac_file.tmp" "$ac_file"
  410. ])