]> thyrsus.com Git - cstrings.git/commitdiff
Fix the initial-file glitch.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 6 Dec 1995 04:15:33 +0000 (04:15 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 6 Dec 1995 04:15:33 +0000 (04:15 +0000)
Makefile

index 33e87e505d02ef8c92f3c531a365d2250f5876bd..950e6f1a0ba32bffe47dd96559b4bf8681a4b982 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,10 @@
 # Makefile for the cstrings tool by Eric S. Raymond
 
+# Note: When the version changes, you also have to change
+#  * the name of the containing directory
+#  * the RPM spec file
+V=2.0
+
 CFLAGS=-O
 LDFLAGS=-s
 
@@ -12,9 +17,16 @@ cstrings: cstrings.l
 clean:
        rm -f lex.yy.c cstrings cstrings.c *~ cstrings.shar cstrings.tar.gz
 
+SOURCES= cstrings.1 Makefile cstrings.l cstrings.lsm cstrings.spec
+
 cstrings.tar.gz:
-       tar -cvf cstrings.tar cstrings.1 cstrings.lsm Makefile cstrings.l 
+       (cd ..; tar -cvf cstrings-$(V)/cstrings.tar `echo $(SOURCES) | sed "/\(^\| \)/s// cstrings-$(V)\//g"`)
        gzip cstrings.tar
 
-cstrings.shar: cstrings.1 Makefile cstrings.l
-       shar cstrings.1 Makefile cstrings.l cstrings.lsm >cstrings.shar
+cstrings.shar: $(SOURCES)
+       shar $(SOURCES) >cstrings.shar
+
+rpm: cstrings.tar.gz
+       cp cstrings.tar.gz /usr/src/SOURCES/cstrings-$(V).tar.gz
+       cp cstrings.spec /usr/src/SPECS/cstrings-$(V)-1.spec
+       rpm -ba cstrings-$(V)-1.spec