From: Daiki Ueno Date: Mon, 12 May 2014 07:17:03 +0000 (+0900) Subject: build: Don't regenerate man.1 if man.1.in does not exist X-Git-Tag: v0.19~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f9aaacbad0ee83c1c459e08f07625c0528cc791;p=thirdparty%2Fgettext.git build: Don't regenerate man.1 if man.1.in does not exist * Makefile.am (gettext.1 ngettext.1): Don't try to replace @localedir@ in .1.in if x-to-1 fails; rewrite the target using the snippet in the Autoconf manual. --- diff --git a/gettext-runtime/man/ChangeLog b/gettext-runtime/man/ChangeLog index 5f3e8362b..4bbea8034 100644 --- a/gettext-runtime/man/ChangeLog +++ b/gettext-runtime/man/ChangeLog @@ -1,3 +1,9 @@ +2014-05-12 Daiki Ueno + + * Makefile.am (gettext.1 ngettext.1): Don't try to replace + @localedir@ in .1.in if x-to-1 fails; rewrite the target using the + snippet in the Autoconf manual. + 2014-04-22 Daiki Ueno build: Use git-version-gen intead of version.sh diff --git a/gettext-runtime/man/Makefile.am b/gettext-runtime/man/Makefile.am index 0b1dabd3a..b05154e3a 100644 --- a/gettext-runtime/man/Makefile.am +++ b/gettext-runtime/man/Makefile.am @@ -81,12 +81,15 @@ uninstall-local: uninstall-html # not the binary; we don't need to regenerate the binary when any # source file changes, only the main one. -gettext.1: gettext.1.in Makefile - sed -e 's|@''localedir''@|$(localedir)|g' < `if test -f gettext.1.in; then echo .; else echo $(srcdir); fi`/gettext.1.in > t-$@ - mv t-$@ $@ -ngettext.1: ngettext.1.in Makefile - sed -e 's|@''localedir''@|$(localedir)|g' < `if test -f ngettext.1.in; then echo .; else echo $(srcdir); fi`/ngettext.1.in > t-$@ - mv t-$@ $@ +gettext.1 ngettext.1: Makefile + srcdir=''; \ + test -f ./$@.in || srcdir=$(srcdir)/; \ + if test -f $${srcdir}$@.in; then \ + sed -e 's|@''localedir''@|$(localedir)|g' $${srcdir}$@.in > t-$@; \ + mv t-$@ $@; \ + fi +gettext.1: gettext.1.in +ngettext.1: ngettext.1.in gettext.1.in: gettext.x ../src/gettext.c IN_HELP2MAN=1 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/gettext$(EXEEXT) $(srcdir)/gettext.x gettext.1.in