# One could grep source directly as follows:
# grep -E " {2,6}-.*[^.] [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
# but that would miss descriptions not on the same line as the -option.
-sc_option_desc_uppercase:
+sc_option_desc_uppercase: $(ALL_MANS)
@grep '^\\fB\\-' -A1 man/*.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' \
&& { echo 1>&2 '$@: found initial capitals in --help'; exit 1; } || :
-sc_option_desc_uppercase: $(dist_man1_MANS) \
- $(patsubst %,man/%.1,$(NO_INSTALL_PROGS_DEFAULT))
# Ensure all man/*.[1x] files are present.
sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
t=$@-t; \
(cd $(srcdir)/man && ls -1 *.x) \
| sed 's/\.x$$//' | $(ASSORT) > $$t; \
- (echo $(patsubst man/%,%,$(dist_man1_MANS)) \
- $(NO_INSTALL_PROGS_DEFAULT) \
+ (echo $(patsubst man/%,%,$(ALL_MANS)) \
| tr -s ' ' '\n' | sed 's/\.1$$//') \
| $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
rm $$t
echo "man/$p.1"
done`
-NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
+# Not installed by "make install", but must be built when creating
+# a distribution tarball.
+EXTRA_MANS=`for p in $no_install_progs_default; do echo man/$p.1; done`
# The programs built and installed by "make && make install".
# Since this is AC_SUBST'd, Automake won't be able to perform rewrite
# Normalize whitespace.
MAN=`echo $MAN`
-NO_INSTALL_PROGS_DEFAULT=`echo $NO_INSTALL_PROGS_DEFAULT`
+EXTRA_MANS=`echo $EXTRA_MANS`
bin_PROGRAMS=`echo $bin_PROGRAMS`
pkglibexec_PROGS=`echo $pkglibexec_PROGRAMS`
-AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
AC_SUBST([bin_PROGRAMS]) AM_SUBST_NOTMAKE([bin_PROGRAMS])
AC_SUBST([pkglibexec_PROGRAMS]) AM_SUBST_NOTMAKE([pkglibexec_PROGRAMS])
+AC_SUBST([EXTRA_MANS])
AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
EXTRA_DIST += $(man_aux) man/help2man
MAINTAINERCLEANFILES += $(dist_man1_MANS)
-# The "$(VAR:%=dir/%.x)" idiom is not portable according to POSIX, but in
-# practice it works with several make implementation (GNU, BSD, CCS make
-# from Solaris 10, Sun distributed make).
-extra_man_x = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.x)
-extra_man_1 = $(NO_INSTALL_PROGS_DEFAULT:%=man/%.1)
+EXTRA_MANS = @EXTRA_MANS@
-EXTRA_DIST += $(extra_man_1) $(extra_man_x)
+EXTRA_DIST += $(EXTRA_MANS) $(EXTRA_MANS:.1=.x)
+
+ALL_MANS = $(dist_man1_MANS) $(EXTRA_MANS)
# This is required because we have subtle inter-directory dependencies:
# in order to generate all man pages, even those for which we don't
# install a binary, require that all programs be built at distribution
# time. We can't use 'dist-hook' for this, since it would run too late:
# the manpages must be generated before the distdir is created and filled.
-$(extra_man_1): $(all_programs)
+$(EXTRA_MANS): $(all_programs)
# Depend on this to get version number changes.
mandep = .version