summaryrefslogtreecommitdiff
path: root/intltool.m4
diff options
context:
space:
mode:
authordobey <>2005-11-24 18:57:21 +0000
committerdobey <>2005-11-24 18:57:21 +0000
commit212adca57e20743a40fa856e9d069f17a8a9eac9 (patch)
treef7c9e89aedde5c91e12c0c1e1226b397310c594f /intltool.m4
parent0d2f34b5a4ccd0bc1c91cf3689fd02b7fa72b07d (diff)
downloadintltool-212adca57e20743a40fa856e9d069f17a8a9eac9.tar.gz
2005-11-24 Stepan Kasal <kasal@ucw.cz>
* intltool-merge.in.in (EXPANDED_LIBDIR): Rename to .. (INTLTOOL_LIBDIR): ... this. * intltool-prepare.in: Use @INTLTOOL_PERL@, not @PERL@. * intltool-unicodify.in: Both of the above two changes. * configure.in: Don't generate the scripts here, ... * Makefile.am: ... generate all of them here. Reorganize, so that the file lists are not redundant; use the "dist_" prefix where possible. When creating *.in from *.in.in, substitute only PACKAGE and VERSION, nothing more. (%: %.in): Fix this rule, so that the @...@ substrings are not garbled by configure; add INTLTOOL_LIBDIR. * intltool.m4 (IT_PROG_INTLTOOL): Simplify the AC_CONFIG_COMMANDS at the end, and add INTLTOOL_LIBDIR.
Diffstat (limited to 'intltool.m4')
-rw-r--r--intltool.m480
1 files changed, 38 insertions, 42 deletions
diff --git a/intltool.m4 b/intltool.m4
index c9a8596..76a077a 100644
--- a/intltool.m4
+++ b/intltool.m4
@@ -109,51 +109,47 @@ AC_CONFIG_COMMANDS_PRE([
]dnl
])
-# Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
+dnl The following is very similar to
+dnl
+dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
+dnl
+dnl with the following slight differences:
+dnl - the *.in files are in ac_aux_dir,
+dnl - if the file haven't changed upon reconfigure, it's not touched,
+dnl - the evaluation of the third parameter enables a hack which computes
+dnl the actual value of $libdir,
+dnl - the user sees "executing intltool commands", instead of
+dnl "creating intltool-extract" and such.
+dnl
+dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
+dnl a reason for it.
AC_CONFIG_COMMANDS([intltool], [
-intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \
- -e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \
- -e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \
- -e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \
- -e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \
- -e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'"
-
-eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \
- > intltool-extract.out
-if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
- rm -f intltool-extract.out
-else
- mv -f intltool-extract.out intltool-extract
-fi
-chmod ugo+x intltool-extract
-chmod u+w intltool-extract
-
-eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \
- > intltool-merge.out
-if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
- rm -f intltool-merge.out
-else
- mv -f intltool-merge.out intltool-merge
-fi
-chmod ugo+x intltool-merge
-chmod u+w intltool-merge
-
-eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \
- > intltool-update.out
-if cmp -s intltool-update intltool-update.out 2>/dev/null; then
- rm -f intltool-update.out
-else
- mv -f intltool-update.out intltool-update
-fi
-chmod ugo+x intltool-update
-chmod u+w intltool-update
-
-], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir}
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}'
-MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}'
-XGETTEXT='${INTLTOOL_XGETTEXT}')
+for file in intltool-extract intltool-merge intltool-update; do
+ sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
+ -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
+ -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
+ -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
+ -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
+ -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
+ -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
+ < ${ac_aux_dir}/${file}.in > ${file}.out
+ if cmp -s ${file} ${file}.out 2>/dev/null; then
+ rm -f ${file}.out
+ else
+ mv -f ${file}.out ${file}
+ fi
+ chmod ugo+x ${file}
+ chmod u+w ${file}
+done
+
+],
+[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
+prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
+INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
+INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
+INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
])