Ready to ship 2.8
[super-star-trek.git] / Makefile
index 71e47ddb29f1b1a9637fe9380110a380de237e33..6fb8a62199f46d8f12d174d588a109e75e9c613e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,7 @@
 # Makefile for the SST2K project
+#
+# SPDX-FileCopyrightText: (C) Eric S. Raymond <esr@thyrsus.com>
+# SPDX-License-Identifier: BSD-2-Clause
 
 VERS=$(shell sed <sst -n -e '/version *= \"*\(.*\)\"/s//\1/p')
 
@@ -29,19 +32,26 @@ super-star-trek-$(VERS).tar.gz: $(SOURCES) sst.6
 dist: sst-$(VERS).tar.gz
 
 check: pylint
-       cd test; $(MAKE) --quiet
+       @cd test >/dev/null; $(MAKE) --quiet
+
+reflow:
+       @black sst
 
 pylint:
        @pylint --score=n sst
 
 clean:
-       rm -f sst.6 sst.html
+       rm -f sst.6 sst.html sst-doc.html
        rm -f *.6 MANIFEST index.html
 
+NEWSVERSION=$(shell sed -n <NEWS '/^[0-9]/s/:.*//p' | head -1)
+
 SHIPPER = version=$(VERS) bkgimage=lpt.jpg
 
 release: super-star-trek-$(VERS).tar.gz sst.html sst-doc.html
+       @[ $(VERS) = $(NEWSVERSION) ] || { echo "Version mismatch!"; exit 1; }
        shipper $(SHIPPER) | sh -e -x
 
 refresh: sst.html
+       @[ $(VERS) = $(NEWSVERSION) ] || { echo "Version mismatch!"; exit 1; }
        shipper -N -w $(SHIPPER)  | sh -e -x