summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authordobey <>2005-11-24 18:57:21 +0000
committerdobey <>2005-11-24 18:57:21 +0000
commit212adca57e20743a40fa856e9d069f17a8a9eac9 (patch)
treef7c9e89aedde5c91e12c0c1e1226b397310c594f /Makefile.am
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 'Makefile.am')
-rw-r--r--Makefile.am88
1 files changed, 43 insertions, 45 deletions
diff --git a/Makefile.am b/Makefile.am
index 029db25..94a9909 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,60 +2,58 @@
SUBDIRS = tests doc
-NULL =
-
-aclocal_macros = intltool.m4
-
-CLEANFILES = \
- intltoolize \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in \
+# Scripts which are bundled with all intltoolized packages:
+distributed_scripts = \
intltool-extract \
intltool-merge \
- intltool-prepare \
- intltool-update \
- $(NULL)
+ intltool-update
-# These are required by intltoolize and
-pkgdata_DATA = \
- Makefile.in.in \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in \
- $(NULL)
+# The intltool scripts
+bin_SCRIPTS = \
+ $(distributed_scripts) \
+ intltoolize \
+ intltool-prepare
+# Deprecated:
+EXTRA_SCRIPTS = intltool-unicodify
-# This macro file should be visible to Automake's aclocal.
-aclocal_DATA = $(aclocal_macros)
+# These are required by intltoolize
+dist_pkgdata_DATA = Makefile.in.in
+nodist_pkgdata_DATA = $(distributed_scripts:=.in)
-# The intltool distributor and installed versions of scripts
+# This macro file should be visible to Automake's aclocal.
+dist_aclocal_DATA = intltool.m4
-bin_SCRIPTS = \
- intltoolize \
- intltool-update \
- intltool-merge \
- intltool-extract \
- intltool-prepare \
- $(NULL)
+CLEANFILES = \
+ $(bin_SCRIPTS) \
+ $(EXTRA_SCRIPTS) \
+ $(nodist_pkgdata_DATA)
EXTRA_DIST = \
- $(aclocal_macros) \
- intltoolize.in \
- intltool-extract.in.in \
- intltool-merge.in.in \
- intltool-update.in.in \
+ $(distributed_scripts:=.in.in) \
intltool-prepare.in \
- intltool.spec.in \
- intltool.spec \
- $(pkgdata_DATA) \
- $(NULL)
+ intltool-unicodify.in \
+ intltool.spec
+
+edit_in_in = sed -e 's|[@]PACKAGE@|$(PACKAGE)|g' \
+ -e 's|[@]VERSION@|$(VERSION)|g'
+
+edit = $(edit_in_in) -e "s|[@]INTLTOOL_PERL@|$(PERL)|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_EXTRACT@|$(bindir)/intltool-extract|g" \
+ -e "s|[@]INTLTOOL_LIBDIR@|$(libdir)|g"
+
+intltool-extract.in: intltool-extract.in.in Makefile
+ $(edit_in_in) "$(srcdir)/intltool-extract.in.in" > $@
+
+intltool-merge.in: intltool-merge.in.in Makefile
+ $(edit_in_in) "$(srcdir)/intltool-merge.in.in" > $@
+
+intltool-update.in: intltool-update.in.in Makefile
+ $(edit_in_in) "$(srcdir)/intltool-update.in.in" > $@
%: %.in Makefile
- sed -e "s#@INTLTOOL_PERL@#$(PERL)#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_EXTRACT@#$(bindir)/intltool-extract#g" \
- < $< > $@
+ $(edit) < $< > $@