]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Don't regenerate man.1 if man.1.in does not exist
authorDaiki Ueno <ueno@gnu.org>
Mon, 12 May 2014 07:17:03 +0000 (16:17 +0900)
committerDaiki Ueno <ueno@gnu.org>
Mon, 12 May 2014 07:17:31 +0000 (16:17 +0900)
* 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.

gettext-runtime/man/ChangeLog
gettext-runtime/man/Makefile.am

index 5f3e8362b969abd9251ec827b15e8c4370d1555e..4bbea80342b416d59b4262a0ca40166cb0bcd50f 100644 (file)
@@ -1,3 +1,9 @@
+2014-05-12  Daiki Ueno  <ueno@gnu.org>
+
+       * 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  <ueno@gnu.org>
 
        build: Use git-version-gen intead of version.sh
index 0b1dabd3a31d712e8baca11160db37ec369ee0ac..b05154e3ad2f7fec053bad216e300f44102c211f 100644 (file)
@@ -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