X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=Makefile;h=8cc3ca550d7cf84a52a40d9aa7b60e1f924abfea;hp=f8acefc33e09e86d348bd888b46b59e082fa7a58;hb=HEAD;hpb=1268b882a9dc50ce93658979aaf1147b1cfbe11a diff --git a/Makefile b/Makefile index f8acefc..6fb8a62 100644 --- a/Makefile +++ b/Makefile @@ -1,81 +1,57 @@ -# Makefile for the Super Star Trek game +# Makefile for the SST2K project +# +# SPDX-FileCopyrightText: (C) Eric S. Raymond +# SPDX-License-Identifier: BSD-2-Clause -VERSION=$(shell sed $(MANDIR)/sst.6.gz -all: sst sst.doc +sst.6: doc/sst.xml + cd doc; xmlto man sst.xml; mv sst.6 .. -ai.o: ai.c sst.h -battle.o: battle.c sst.h -events.o: events.c sst.h -finish.o: finish.c sst.h -io.o: io.c sst.h -moving.o: moving.c sstlinux.h sst.h -planets.o: planets.c sst.h -reports.o: reports.c sst.h -setup.o: setup.c sst.h -sst.o: sst.c sstlinux.h sst.h -sstlinux.o: sstlinux.c sstlinux.h +sst.html: doc/sst.xml + cd doc; xmlto html-nochunks sst.xml; mv sst.html .. -sst: $(OFILES) - gcc -o sst $(OFILES) -lm -lcurses +sst-doc.html: doc/sst-doc.xml + xmlto xhtml-nochunks doc/sst-doc.xml -$(OFILES): $(HFILES) +super-star-trek-$(VERS).tar.gz: $(SOURCES) sst.6 + tar --transform='s:^:super-star-trek-$(VERS)/:' --show-transformed-names -cvzf super-star-trek-$(VERS).tar.gz $(SOURCES) sst.6 -sst.6: sst.xml - xmlto man sst.xml +dist: sst-$(VERS).tar.gz -sst-doc.txt: sst-doc.xml - xmlto -m sst-layer.xsl txt sst-doc.xml -sst.doc: sst-doc.txt - makehelp.py >sst.doc +check: pylint + @cd test >/dev/null; $(MAKE) --quiet -sst-doc.html: sst-doc.xml - xmlto xhtml-nochunks sst-doc.xml +reflow: + @black sst -install: uninstall sst.6 sst.doc sst-doc.html - install -m 755 -o 0 -g 0 -d $(ROOT)/usr/bin/ - install -m 755 -o 0 -g 0 sst $(ROOT)/usr/bin/sst - install -m 755 -o 0 -g 0 -d $(ROOT)/usr/share/man/man6/ - install -m 755 -o 0 -g 0 sst.6 $(ROOT)/usr/share/man/man6/sst.6 - mkdir -p /usr/share/doc/sst/ - install -m 644 -o 0 -g 0 sst.doc $(ROOT)/usr/share/doc/sst/ - install -m 644 -o 0 -g 0 sst-doc.html $(ROOT)/usr/share/doc/sst/index.html - -uninstall: - rm -f ${ROOT}/usr/bin/sst ${ROOT}/usr/share/man/man6/sst.6 - rm -fr ${ROOT}/usr/share/doc/sst/ +pylint: + @pylint --score=n sst clean: - rm -f *.o sst sst-doc.html sst-doc.txt sst.doc - -# The "trunk" below assumes this is a Subversion working copy -sst-$(VERSION).tar.gz: $(SOURCES) sst.6 - ls $(SOURCES) sst.6 | sed s:^:sst-$(VERSION)/: >MANIFEST - (cd ..; ln -s trunk sst-$(VERSION)) - (cd ..; tar -czvf trunk/sst-$(VERSION).tar.gz `cat trunk/MANIFEST`) - (cd ..; rm sst-$(VERSION)) + rm -f sst.6 sst.html sst-doc.html + rm -f *.6 MANIFEST index.html -dist: sst-$(VERSION).tar.gz +NEWSVERSION=$(shell sed -n