]> thyrsus.com Git - hexdump.git/commitdiff
Ready to go.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 7 Dec 1995 20:37:57 +0000 (20:37 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 7 Dec 1995 20:37:57 +0000 (20:37 +0000)
Makefile

index 6c15a560d4c7526201ba3d1a91077adad51e3cf8..4ba43001bff6834b528bc7a84aa424389a3b0191 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,27 @@
 # Makefile for Eric Raymond's silly hex dumper
 
+# Note: When the version changes, you also have to change
+#  * the name of the containing directory
+#  * the RPM spec file
+V=1.0
+
 hex: hex.c
 
-hex.tar: READ.ME hex.c hex.1
-       tar -cvf hex.tar READ.ME Makefile hex.c hex.1 hex.lsm
+SOURCES = READ.ME Makefile hex.c hex.1 hex.lsm hex.spec
+
+hex.tar: $(SOURCES)
+       (cd ..; tar -cvf hex-$(V)/hex.tar `echo $(SOURCES) | sed "/\(^\| \)/s// hex-$(V)\//g"`)
 hex.tar.gz: hex.tar
-       gzip hex.tar
+       gzip -f hex.tar
 
-hex.shar: READ.ME hex.c hex.1
-       shar READ.ME hex.c hex.1 hex.lsm >hex.shar
+hex.shar: $(SOURCES)
+       shar $(SOURCES) >hex.shar
 
 clean:
        rm -f hex hex.tar hex.shar
+
+TOPDIR=/usr/src/rpm
+rpm: hex.tar.gz
+       cp hex.tar.gz $(TOPDIR)/SOURCES/hex-$(V).tar.gz
+       cp hex.spec $(TOPDIR)/SPECS/hex-$(V)-1.spec
+       rpm -ba hex-$(V)-1.spec