A few adjustments for make distcheck to work

- dist tarball has PDFs pre-generated in docs/
This commit is contained in:
pi-rho 2012-05-03 20:27:32 -05:00
parent b56f6dfb70
commit a25b610e9e
2 changed files with 21 additions and 5 deletions

View File

@ -5,7 +5,7 @@ dist_man1_MANS = man/hdng.mdoc man/unhex.mdoc man/xor.mdoc man/repr.mdoc \
man/puniq.mdoc man/pmerge.mdoc man/p4split.mdoc man/puniq.mdoc man/pmerge.mdoc man/p4split.mdoc
dist_man7_MANS = man/netre-tools.mdoc dist_man7_MANS = man/netre-tools.mdoc
MANPAGES = $(dist_man1_MANS) $(dist_man7_MANS) MANPAGES = $(dist_man1_MANS) $(dist_man7_MANS)
PDFPAGES = ${MANPAGES:.mdoc=.pdf} PDFPAGES = $(MANPAGES:man/%.mdoc=docs/%.pdf)
AM_CFLAGS = AM_CFLAGS =
AM_CPPFLAGS = AM_CPPFLAGS =
@ -41,6 +41,8 @@ pmerge_LDADD = libpcap.la
p4split_SOURCES = src/p4split.c p4split_SOURCES = src/p4split.c
p4split_LDADD = libpcap.la p4split_LDADD = libpcap.la
EXTRA_DIST = man docs
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 build-aux/compile \ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 build-aux/compile \
build-aux/config.guess build-aux/config.sub \ build-aux/config.guess build-aux/config.sub \
build-aux/depcomp build-aux/install-sh build-aux/missing \ build-aux/depcomp build-aux/install-sh build-aux/missing \
@ -51,14 +53,24 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 build-aux/compile \
docdir = $(datadir)/doc/@PACKAGE@ docdir = $(datadir)/doc/@PACKAGE@
doc_DATA = README AUTHORS TODO $(PDFPAGES) doc_DATA = README AUTHORS TODO $(PDFPAGES)
SUFFIXES = .mdoc .pdf MDOC2PS = groff -mdoc -t -Tps
PS2PDF = ps2pdf -
.mdoc.pdf: docs:
groff -mdoc -t -Tps $< | ps2pdf - - >$@ mkdir -p man
mkdir -p docs
for i in $(MANPAGES:man/%.mdoc=%); do \
$(MDOC2PS) $(srcdir)/man/$$i.mdoc | $(PS2PDF) $(srcdir)/docs/$$i.pdf; \
done
$(PDFPAGES): docs
maintainer-clean-local: maintainer-clean-local:
rmdir build-aux rmdir build-aux
rmdir m4 rmdir m4
-rmdir docs
dist-hook: docs
install-exec-hook: install-exec-hook:
(cd $(DESTDIR)$(bindir); \ (cd $(DESTDIR)$(bindir); \
@ -74,3 +86,7 @@ install-data-hook:
mv -f $(DESTDIR)$(docdir)/xor.pdf \ mv -f $(DESTDIR)$(docdir)/xor.pdf \
$(DESTDIR)$(docdir)/transformer.pdf $(DESTDIR)$(docdir)/transformer.pdf
uninstall-hook:
rm $(DESTDIR)$(bindir)/{rot,rol,caesar}
rm $(DESTDIR)$(man1dir)/{rot,rol,caesar}.1
rm $(DESTDIR)$(docdir)/transformer.pdf

View File

@ -7,7 +7,7 @@ AC_CONFIG_SRCDIR([src/hdng.c])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 gnu check-news silent-rules subdir-objects -Wall -Werror]) AM_INIT_AUTOMAKE([1.11 gnu check-news silent-rules subdir-objects no-dist-gzip dist-xz -Wall -Werror])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
AM_SILENT_RULES([yes]) AM_SILENT_RULES([yes])
AC_SUBST([VERSION]) AC_SUBST([VERSION])