update autotools build stuff

This commit is contained in:
pi-rho 2013-02-05 13:03:02 -06:00
parent 3b5b71a165
commit db1ad72261
2 changed files with 65 additions and 42 deletions

View File

@ -1,11 +1,13 @@
ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = hdng unhex xor repr puniq pmerge p4split
dist_man1_MANS = man/hdng.mdoc man/unhex.mdoc man/xor.mdoc man/repr.mdoc \
man/puniq.mdoc man/pmerge.mdoc man/p4split.mdoc
dist_man7_MANS = man/netre-tools.mdoc
bin_PROGRAMS = hdng unhex xor repr puniq pmerge p4split pcat
dist_bin_SCRIPTS = scripts/dumbdecode
dist_man1_MANS = docs/hdng.mdoc docs/unhex.mdoc docs/xor.mdoc docs/repr.mdoc \
docs/puniq.mdoc docs/pmerge.mdoc docs/p4split.mdoc \
docs/pcat.mdoc docs/dumbdecode.mdoc
dist_man7_MANS = docs/netre-tools.mdoc
MANPAGES = $(dist_man1_MANS) $(dist_man7_MANS)
PDFPAGES = $(MANPAGES:man/%.mdoc=docs/%.pdf)
PDFPAGES = $(MANPAGES:%.mdoc=%.pdf)
AM_CFLAGS =
AM_CPPFLAGS =
@ -25,8 +27,9 @@ if IS_DEBUG
AM_CPPFLAGS += -DDEBUGSTMTS
endif
noinst_LTLIBRARIES = libpcap.la
noinst_LTLIBRARIES = libpcap.la libstream.la
libpcap_la_SOURCES = src/pcap.c src/pcap.h
libstream_la_SOURCES = src/stream.c src/stream.h
noinst_HEADERS = src/netre.h
@ -40,8 +43,8 @@ pmerge_SOURCES = src/pmerge.c
pmerge_LDADD = libpcap.la
p4split_SOURCES = src/p4split.c
p4split_LDADD = libpcap.la
EXTRA_DIST = man docs
pcat_SOURCES = src/pcat.c
pcat_LDADD = libpcap.la libstream.la
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 build-aux/compile \
build-aux/config.guess build-aux/config.sub \
@ -50,25 +53,45 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 build-aux/compile \
m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 \
m4/ltsugar.m4 m4/ltversion.m4 $(PDFPAGES)
CLEANFILES = $(MANPAGES) $(PDFPAGES) scripts/dumbdecode
EXTRA_DIST = $(MANPAGES) $(PDFPAGES)
docdir = $(datadir)/doc/@PACKAGE@
doc_DATA = README AUTHORS TODO $(PDFPAGES)
MDOC2PS = groff -mdoc -t -Tps
PS2PDF = ps2pdf -
PS2PDF = ps2pdf - -
RELEASED = May 23, 2012
EDIT = sed -e 's!@RELEASE_DATE\@!$(RELEASED)!g' \
-e 's!@VERSION\@!@VERSION@!g'
docs:
mkdir -p man
mkdir -p docs
for i in $(MANPAGES:man/%.mdoc=%); do \
$(MDOC2PS) $(srcdir)/man/$$i.mdoc | $(PS2PDF) $(srcdir)/docs/$$i.pdf; \
done
docs: Makefile $(MANPAGES) $(PDFPAGES)
$(PDFPAGES): docs
SUFFIXES = .mdoc.in .mdoc .pdf .in
scripts/dumbdecode: scripts/dumbdecode.in
$(AM_V_GEN)
$(AM_V_at)rm -f $@ $@.tmp; \
cat $(srcdir)/$< | $(EDIT) > $@.tmp; \
mv $@.tmp $@; \
chmod 0755 $@
.mdoc.pdf:
$(AM_V_GEN)
$(AM_V_at)rm -rf $@ $@.tmp; \
cat $(srcdir)/$< | $(MDOC2PS) | $(PS2PDF) > $@.tmp; \
mv $@.tmp $@
.mdoc.in.mdoc:
$(AM_V_GEN)
$(AM_V_at)rm -f $@ $@.tmp; \
cat $(srcdir)/$< | $(EDIT) > $@.tmp; \
mv $@.tmp $@
maintainer-clean-local:
rmdir build-aux
rmdir m4
-rmdir docs
dist-hook: docs

View File

@ -2,7 +2,7 @@
AC_PREREQ([2.65])
AC_INIT([netre-tools], [0.1337], [pi-rho@tyr.cx])
AC_INIT([netre-tools], [1.1337], [pi-rho@tyr.cx])
AC_CONFIG_SRCDIR([src/hdng.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
@ -22,7 +22,7 @@ AC_PROG_INSTALL
LT_INIT
# Check for headers
AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stdint.h stdlib.h string.h strings.h sys/socket.h])
AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/socket.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL