# Makefile for Eric Raymond's silly hex dumper
-# Note: When the version changes, you also have to change the RPM spec file
-VERS=1.4
+VERS=1.5
-hex: hex.c
- $(CC) -DRELEASE=\"$(VERS)\" -O hex.c -o hex
+hexdump: hexdump.c
+ $(CC) -DRELEASE=\"$(VERS)\" -O hexdump.c -o hexdump
-SOURCES = READ.ME Makefile hex.c hex.xml hex.spec
+SOURCES = READ.ME COPYING Makefile hexdump.c hexdump.xml hexdump.spec
-hex-$(VERS).tar.gz: $(SOURCES) hex.1
- @ls $(SOURCES) hex.1 | sed s:^:hex-$(VERS)/: >MANIFEST
- @(cd ..; ln -s hex hex-$(VERS))
- (cd ..; tar -czvf hex/hex-$(VERS).tar.gz `cat hex/MANIFEST`)
- @(cd ..; rm hex-$(VERS))
+hexdump-$(VERS).tar.gz: $(SOURCES) hexdump.1
+ @ls $(SOURCES) hexdump.1 | sed s:^:hexdump-$(VERS)/: >MANIFEST
+ @(cd ..; ln -s hexdump hexdump-$(VERS))
+ (cd ..; tar -czvf hexdump/hexdump-$(VERS).tar.gz `cat hexdump/MANIFEST`)
+ @(cd ..; rm hexdump-$(VERS))
-hex.1: hex.xml
- xmlto man hex.xml
+hexdump.1: hexdump.xml
+ xmlto man hexdump.xml
-install: hex.1 uninstall
- cp hex /usr/bin
- cp hex.1 /usr/share/man/man1/hex.1
+install: hexdump.1 uninstall
+ cp hexdump /usr/bin
+ cp hexdump.1 /usr/share/man/man1/hexdump.1
uninstall:
- rm -f /usr/bin/hex /usr/share/man/man1/hex.
+ rm -f /usr/bin/hexdump /usr/share/man/man1/hexdump.
clean:
- rm -f hex hex-$(VERS).tar.gz *.rpm
+ rm -f hexdump hexdump-$(VERS).tar.gz *.rpm
-dist: hex-$(VERS).tar.gz
+dist: hexdump-$(VERS).tar.gz
RPMROOT=/usr/src/redhat
-RPM = rpmbuild
-RPMFLAGS = -ba
rpm: dist
- cp hex-$(VERS).tar.gz $(RPMROOT)/SOURCES;
- cp hex.spec $(RPMROOT)/SPECS
- cd $(RPMROOT)/SPECS; $(RPM) $(RPMFLAGS) hex.spec
- cp $(RPMROOT)/RPMS/`arch|sed 's/i[4-9]86/i386/'`/hex-$(VERS)*.rpm .
- cp $(RPMROOT)/SRPMS/hex-$(VERS)*.src.rpm .
+ rpmbuild --define 'myversion $(VERS)' -ta hexdump-$(VERS).tar.gz
+ cp $(RPMROOT)/RPMS/*/hexdump-$(VERS)*.rpm .
+ cp $(RPMROOT)/SRPMS/hexdump-$(VERS)*.src.rpm .
<!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.1.2//EN"
"docbook/docbookx.dtd">
-<refentry id='hex.1'>
+<refentry id='hexdump.1'>
<refmeta>
-<refentrytitle>hex</refentrytitle>
+<refentrytitle>hexdump</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class='date'>Oct 27, 1987</refmiscinfo>
</refmeta>
<refnamediv id='name'>
-<refname>hex</refname>
-<refpurpose>dump a file to stdout in CP/M-like hex format</refpurpose>
+<refname>hexdump</refname>
+<refpurpose>dump a file to stdout in CP/M-like hexadecimal format</refpurpose>
</refnamediv>
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
- <!-- hex [-V] [-w] [-e] [-c] [-g] [-s] [filename...] -->
- <command>hex</command> <arg choice='opt'>-V </arg>
+ <command>hexdump</command> <arg choice='opt'>-V </arg>
<arg choice='opt'>-w </arg>
<arg choice='opt'>-e </arg>
<arg choice='opt'>-c </arg>
<para>This program provides a facility for obtaining a dump of a
binary file to stdout. The default format is a CP/M style
-<command>hex</command> dump with byte offset in file, 16 bytes of
+haxadecimal dump with byte offset in file, 16 bytes of
<command>hex</command> and 16 bytes of alpha representation with '.'
for non-printables per line. If no filename is given, hex reads from
standard input.</para>
<para>If the command-line arguments include two or more filenames
(with - being regarded as a `filename' for standard input),
-<command>hex</command> will emit a one-line header giving the name of
+<command>hexdump</command> will emit a one-line header giving the name of
the file in front of each input file.</para>
<para>The <option>-s</option> option expects a start offset,
optionally followed by a comma-separated count. Each of these should
-be a decimal or <command>hex</command> integer (hex must be prefixed
+be a decimal or hexadecimal integer (hexadecimal must be prefixed
by x or h; leading zeros will be ignored).</para>
<para>The <option>-w</option> option expects a width, formatted as a
-single decimal or <command>hex</command> number in the style of an
+single decimal or haxadecimal number in the style of an
<option>-s</option> option argument. Odd widths turn on the
<option>-g</option> option.</para> </refsect1>
Network Architecture (SNA).</para> </refsect1>
<refsect1 id='author'><title>AUTHOR</title> <para>Eric S. Raymond
-<esr@thyrsus.com>. See my home page at <ulink
+<email>esr@thyrsus.com<email>. See my home page at <ulink
url='http://www.catb.org/~esr'>http://www.catb.org/~esr</ulink>
for updates and related resources.</para>
</refsect1>