1## Makefile for the gettext-tools/man subdirectory of GNU gettext 2## Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc. 3## 4## This program is free software; you can redistribute it and/or modify 5## it under the terms of the GNU General Public License as published by 6## the Free Software Foundation; either version 2, or (at your option) 7## any later version. 8## 9## This program is distributed in the hope that it will be useful, 10## but WITHOUT ANY WARRANTY; without even the implied warranty of 11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12## GNU General Public License for more details. 13## 14## You should have received a copy of the GNU General Public License 15## along with this program; if not, write to the Free Software Foundation, 16## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 18## Process this file with automake to produce Makefile.in. 19 20VERSION = @VERSION@ 21 22AUTOMAKE_OPTIONS = 1.2 gnits 23EXTRA_DIST = 24 25# A manual page for each of the bin_PROGRAMS in src/Makefile.am 26# and for each of the bin_SCRIPTS in misc/Makefile.am. 27 28man_aux = \ 29msgcmp.x msgfmt.x msgmerge.x msgunfmt.x xgettext.x \ 30msgattrib.x msgcat.x msgcomm.x msgconv.x msgen.x msgexec.x msgfilter.x msggrep.x msginit.x msguniq.x \ 31gettextize.x autopoint.x 32 33# Likewise. 34 35man_MAN1OTHER = \ 36msgcmp.1 msgfmt.1 msgmerge.1 msgunfmt.1 xgettext.1 \ 37msgattrib.1 msgcat.1 msgcomm.1 msgconv.1 msgen.1 msgexec.1 msgfilter.1 msggrep.1 msginit.1 msguniq.1 \ 38gettextize.1 autopoint.1 39man_MAN1 = $(man_MAN1OTHER) 40man_MANS = $(man_MAN1) 41 42man_HTMLOTHER = \ 43msgcmp.1.html msgfmt.1.html msgmerge.1.html msgunfmt.1.html xgettext.1.html \ 44msgattrib.1.html msgcat.1.html msgcomm.1.html msgconv.1.html msgen.1.html msgexec.1.html msgfilter.1.html msggrep.1.html msginit.1.html msguniq.1.html \ 45gettextize.1.html autopoint.1.html 46man_HTML = $(man_HTMLOTHER) 47 48EXTRA_DIST += help2man $(man_aux) $(man_MAN1OTHER) $(man_HTMLOTHER) ChangeLog.0 49MAINTAINERCLEANFILES = $(man_MAN1OTHER) $(man_HTMLOTHER) 50 51PERL = @PERL@ 52RM = rm -f 53 54# help2man 1.24 or newer. 55HELP2MAN = $(PERL) -w -- $(srcdir)/help2man 56 57# groff 1.17 or newer. 58MAN2HTML = groff -mandoc -Thtml 59 60 61# We distribute both the man pages and their HTML equivalent. 62# The user can generate the parts, via 63# make man 64# make html 65 66all-local: html-local 67install-data-local: install-html 68installdirs-local: installdirs-html 69uninstall-local: uninstall-html 70 71 72# Man pages. 73 74# The progname.x files contain some extra information not found in the 75# "progname --help" output. 76 77msgcmp.1: msgcmp.x 78 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcmp$(EXEEXT) $(srcdir)/msgcmp.x msgcmp.1 79msgfmt.1: msgfmt.x 80 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgfmt$(EXEEXT) $(srcdir)/msgfmt.x msgfmt.1 81msgmerge.1: msgmerge.x 82 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgmerge$(EXEEXT) $(srcdir)/msgmerge.x msgmerge.1 83msgunfmt.1: msgunfmt.x 84 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgunfmt$(EXEEXT) $(srcdir)/msgunfmt.x msgunfmt.1 85xgettext.1: xgettext.x 86 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/xgettext$(EXEEXT) $(srcdir)/xgettext.x xgettext.1 87msgattrib.1: msgattrib.x 88 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgattrib$(EXEEXT) $(srcdir)/msgattrib.x msgattrib.1 89msgcat.1: msgcat.x 90 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcat$(EXEEXT) $(srcdir)/msgcat.x msgcat.1 91msgcomm.1: msgcomm.x 92 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgcomm$(EXEEXT) $(srcdir)/msgcomm.x msgcomm.1 93msgconv.1: msgconv.x 94 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgconv$(EXEEXT) $(srcdir)/msgconv.x msgconv.1 95msgen.1: msgen.x 96 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgen$(EXEEXT) $(srcdir)/msgen.x msgen.1 97msgexec.1: msgexec.x 98 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgexec$(EXEEXT) $(srcdir)/msgexec.x msgexec.1 99msgfilter.1: msgfilter.x 100 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msgfilter$(EXEEXT) $(srcdir)/msgfilter.x msgfilter.1 101msggrep.1: msggrep.x 102 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msggrep$(EXEEXT) $(srcdir)/msggrep.x msggrep.1 103msginit.1: msginit.x 104 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msginit$(EXEEXT) $(srcdir)/msginit.x msginit.1 105msguniq.1: msguniq.x 106 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../src/msguniq$(EXEEXT) $(srcdir)/msguniq.x msguniq.1 107 108gettextize.1: gettextize.x 109 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../misc/gettextize $(srcdir)/gettextize.x gettextize.1 110autopoint.1: autopoint.x 111 $(SHELL) x-to-1 $(UPDATEMODE) "$(PERL)" "$(HELP2MAN)" ../misc/autopoint $(srcdir)/autopoint.x autopoint.1 112 113# Depend on version.sh to get version number changes. 114$(man_MAN1): help2man $(top_srcdir)/../version.sh 115 116# Update them also during "make dist", in order to propagate added command 117# line options that were added, even if version.sh didn't change. 118UPDATEMODE = 119update-man1: 120 $(MAKE) $(man_MAN1) UPDATEMODE=--update 121 $(MAKE) 122# Hidden from automake, but really activated. Works around an automake-1.5 bug. 123#distdir: update-man1 124 125 126# Man pages in HTML format. 127 128html-local: $(man_HTML) 129 130msgcmp.1.html: msgcmp.1 131 $(MAN2HTML) `if test -f msgcmp.1; then echo .; else echo $(srcdir); fi`/msgcmp.1 | sed -e '/CreationDate:/d' > t-$@ 132 mv t-$@ $@ 133msgfmt.1.html: msgfmt.1 134 $(MAN2HTML) `if test -f msgfmt.1; then echo .; else echo $(srcdir); fi`/msgfmt.1 | sed -e '/CreationDate:/d' > t-$@ 135 mv t-$@ $@ 136msgmerge.1.html: msgmerge.1 137 $(MAN2HTML) `if test -f msgmerge.1; then echo .; else echo $(srcdir); fi`/msgmerge.1 | sed -e '/CreationDate:/d' > t-$@ 138 mv t-$@ $@ 139msgunfmt.1.html: msgunfmt.1 140 $(MAN2HTML) `if test -f msgunfmt.1; then echo .; else echo $(srcdir); fi`/msgunfmt.1 | sed -e '/CreationDate:/d' > t-$@ 141 mv t-$@ $@ 142xgettext.1.html: xgettext.1 143 $(MAN2HTML) `if test -f xgettext.1; then echo .; else echo $(srcdir); fi`/xgettext.1 | sed -e '/CreationDate:/d' > t-$@ 144 mv t-$@ $@ 145msgattrib.1.html: msgattrib.1 146 $(MAN2HTML) `if test -f msgattrib.1; then echo .; else echo $(srcdir); fi`/msgattrib.1 | sed -e '/CreationDate:/d' > t-$@ 147 mv t-$@ $@ 148msgcat.1.html: msgcat.1 149 $(MAN2HTML) `if test -f msgcat.1; then echo .; else echo $(srcdir); fi`/msgcat.1 | sed -e '/CreationDate:/d' > t-$@ 150 mv t-$@ $@ 151msgcomm.1.html: msgcomm.1 152 $(MAN2HTML) `if test -f msgcomm.1; then echo .; else echo $(srcdir); fi`/msgcomm.1 | sed -e '/CreationDate:/d' > t-$@ 153 mv t-$@ $@ 154msgconv.1.html: msgconv.1 155 $(MAN2HTML) `if test -f msgconv.1; then echo .; else echo $(srcdir); fi`/msgconv.1 | sed -e '/CreationDate:/d' > t-$@ 156 mv t-$@ $@ 157msgen.1.html: msgen.1 158 $(MAN2HTML) `if test -f msgen.1; then echo .; else echo $(srcdir); fi`/msgen.1 | sed -e '/CreationDate:/d' > t-$@ 159 mv t-$@ $@ 160msgexec.1.html: msgexec.1 161 $(MAN2HTML) `if test -f msgexec.1; then echo .; else echo $(srcdir); fi`/msgexec.1 | sed -e '/CreationDate:/d' > t-$@ 162 mv t-$@ $@ 163msgfilter.1.html: msgfilter.1 164 $(MAN2HTML) `if test -f msgfilter.1; then echo .; else echo $(srcdir); fi`/msgfilter.1 | sed -e '/CreationDate:/d' > t-$@ 165 mv t-$@ $@ 166msggrep.1.html: msggrep.1 167 $(MAN2HTML) `if test -f msggrep.1; then echo .; else echo $(srcdir); fi`/msggrep.1 | sed -e '/CreationDate:/d' > t-$@ 168 mv t-$@ $@ 169msginit.1.html: msginit.1 170 $(MAN2HTML) `if test -f msginit.1; then echo .; else echo $(srcdir); fi`/msginit.1 | sed -e '/CreationDate:/d' > t-$@ 171 mv t-$@ $@ 172msguniq.1.html: msguniq.1 173 $(MAN2HTML) `if test -f msguniq.1; then echo .; else echo $(srcdir); fi`/msguniq.1 | sed -e '/CreationDate:/d' > t-$@ 174 mv t-$@ $@ 175gettextize.1.html: gettextize.1 176 $(MAN2HTML) `if test -f gettextize.1; then echo .; else echo $(srcdir); fi`/gettextize.1 | sed -e '/CreationDate:/d' > t-$@ 177 mv t-$@ $@ 178autopoint.1.html: autopoint.1 179 $(MAN2HTML) `if test -f autopoint.1; then echo .; else echo $(srcdir); fi`/autopoint.1 | sed -e '/CreationDate:/d' > t-$@ 180 mv t-$@ $@ 181 182install-html-local: 183 $(mkdir_p) $(DESTDIR)$(htmldir) 184 for file in $(man_HTML); do \ 185 if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ 186 $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \ 187 done 188 189installdirs-html: 190 $(mkdir_p) $(DESTDIR)$(htmldir) 191 192uninstall-html: 193 for file in $(man_HTML); do \ 194 $(RM) $(DESTDIR)$(htmldir)/$$file; \ 195 done 196