build cruft; update the simple Makefile

This commit is contained in:
pi-rho 2013-02-05 13:15:42 -06:00
parent db1ad72261
commit 332b9ae5dc
3 changed files with 16 additions and 40 deletions

View File

@ -7,7 +7,6 @@ dist_man1_MANS = docs/hdng.mdoc docs/unhex.mdoc docs/xor.mdoc docs/repr.mdoc \
docs/pcat.mdoc docs/dumbdecode.mdoc
dist_man7_MANS = docs/netre-tools.mdoc
MANPAGES = $(dist_man1_MANS) $(dist_man7_MANS)
PDFPAGES = $(MANPAGES:%.mdoc=%.pdf)
AM_CFLAGS =
AM_CPPFLAGS =
@ -51,43 +50,15 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 build-aux/compile
build-aux/depcomp build-aux/install-sh build-aux/missing \
config.h.in config.h.in~ configure build-aux/ltmain.sh \
m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 \
m4/ltsugar.m4 m4/ltversion.m4 $(PDFPAGES)
m4/ltsugar.m4 m4/ltversion.m4
CLEANFILES = $(MANPAGES) $(PDFPAGES) scripts/dumbdecode
EXTRA_DIST = $(MANPAGES) $(PDFPAGES)
EXTRA_DIST = $(MANPAGES)
docdir = $(datadir)/doc/@PACKAGE@
doc_DATA = README AUTHORS TODO $(PDFPAGES)
doc_DATA = README AUTHORS TODO
MDOC2PS = groff -mdoc -t -Tps
PS2PDF = ps2pdf - -
RELEASED = May 23, 2012
EDIT = sed -e 's!@RELEASE_DATE\@!$(RELEASED)!g' \
-e 's!@VERSION\@!@VERSION@!g'
docs: Makefile $(MANPAGES) $(PDFPAGES)
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 $@
docs: Makefile $(MANPAGES)
maintainer-clean-local:
rmdir build-aux
@ -106,10 +77,7 @@ install-data-hook:
$(LN_S) xor.1 rot.1; \
$(LN_S) xor.1 rol.1; \
$(LN_S) xor.1 caesar.1; )
mv -f $(DESTDIR)$(docdir)/xor.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

5
NEWS
View File

@ -1,3 +1,8 @@
1.1337 Still the Middle
* Added pcat, a utility to dump the contents of packet capture files in a
line-based, parsable format
0.1337 The Middle
* Added PDF document creation (groff -> ps2pdf)

View File

@ -6,15 +6,18 @@ man1dir = $(prefix)/share/man/man1
man7dir = $(prefix)/share/man/man7
docdir = $(prefix)/share/doc/netre-tools
mansrc = ../man
mansrc = ../docs
TARGETS = pmerge puniq p4split hdng xor unhex repr
TARGETS = pmerge puniq p4split hdng xor unhex repr pcat dumbdecode
all: config.h $(TARGETS)
pmerge: pmerge.o pcap.o
puniq: puniq.o pcap.o
pmerge: pmerge.c pcap.o
puniq: puniq.c pcap.o
p4split: p4split.c pcap.o
pcat: pcat.c stream.o pcap.o
dumbdecode:
cp ../scripts/dumbdecode $(CURDIR)
CC = gcc
CFLAGS = -g -O2 -std=c99