diff options
-rw-r--r-- | Makefile.am | 26 | ||||
-rw-r--r-- | locale/local.mk | 1 |
2 files changed, 24 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index c7428bb..ddffe4d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,20 +18,24 @@ include $(top_srcdir)/src/local.mk include $(top_srcdir)/lib/local.mk include $(top_srcdir)/lib/cmd/local.mk +include $(top_srcdir)/locale/local.mk bin_SCRIPTS = $(bin_sources:.sh=) pkgdata_SCRIPTS = $(pkgdata_sources:.sh=.sm) pkgdatacmd_SCRIPTS = $(pkgdatacmd_sources:.sh=.sm) +locale_MESSAGES = $(locale_sources:.sh=.ms) CLEANFILES = \ $(bin_SCRIPTS) \ $(pkgdata_SCRIPTS) \ - $(pkgdatacmd_SCRIPTS) + $(pkgdatacmd_SCRIPTS) \ + $(locale_MESSAGES) pkgdatacmddir = $(pkgdatadir)/cmd EXTRA_DIST = \ autogen.sh \ $(bin_sources) \ $(pkgdata_sources) \ - $(pkgdatacmd_sources) + $(pkgdatacmd_sources) \ + $(locale_sources) SUFFIXES = .sh .sm @@ -49,7 +53,19 @@ do_subst = sed \ -e "s|[@]textdomain[@]|$(textdomain)|g" in-place: - $(MAKE) $(AM_MAKEFLAGS) pkgdatadir=lib all-am + $(MAKE) $(AM_MAKEFLAGS) pkgdatadir=lib localedir=locale all-am + +all-local: $(locale_MESSAGES) + +install-data-local: $(locale_MESSAGES) + @$(NORMAL_INSTALL) + for f in $(locale_MESSAGES); do \ + ff="$${f#*/}"; \ + dir="$(DESTDIR)$(localedir)/$${f%.ms}/LC_MESSAGES"; \ + $(MKDIR_P) "$${dir}" || exit 1; \ + $(INSTALL_DATA) "$${f}" "$${dir}/$(textdomain).ms" || \ + exit $$?; \ + done really-clean: distclean rm -Rf $(srcdir)/aclocal.m4 $(srcdir)/autom4te.cache/ \ @@ -73,3 +89,7 @@ dist-hook: .sh.sm: $(MKDIR_P) "$$(dirname $@)" $(do_subst) $< >$@ + +.sh.ms: + $(MKDIR_P) "$$(dirname $@)" + cp $< $@ diff --git a/locale/local.mk b/locale/local.mk new file mode 100644 index 0000000..feac140 --- /dev/null +++ b/locale/local.mk @@ -0,0 +1 @@ +locale_sources = |