X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=pyfrprog.git;a=blobdiff_plain;f=Makefile;h=ee3cabe31e89ec3a0ef6fa6417356fd079689814;hp=9f3c3b96381389bd8caf1c5459528ef21311aad0;hb=HEAD;hpb=5b1e050a0c5d3fc992a0a29f55f2826aad135353 diff --git a/Makefile b/Makefile index 9f3c3b9..ee3cabe 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,30 @@ PREFIX = /usr +ifeq ($(shell which git > /dev/null 2> /dev/null; echo $$?),0) +VERSION = $(shell git describe --abbrev=6) +else +VERSION = v0.1-XXX +endif + all: make -C pkernel/ #install: all #this just work when $FUJDEV is set for root too, eh? install: - sed -e 's/%PREFIX%/\$(PREFIX)/g' frprog.py > $(PREFIX)/bin/frprog - cp SerialPort_linux.pyc $(PREFIX)/bin/SerialPort_linux.pyc + sed -e 's/%PREFIX%/\$(PREFIX)/g' frprog.py | sed -e 's/%VERSION%/$(VERSION)/g'> $(PREFIX)/bin/frprog + cp SerialPort_linux.py $(PREFIX)/bin/SerialPort_linux.py mkdir -p $(PREFIX)/share/frprog/ cp pkernel/pkernel.mhx $(PREFIX)/share/frprog/pkernel.mhx chmod a+rx $(PREFIX)/bin/frprog - chmod a+r $(PREFIX)/bin/SerialPort_linux.pyc + chmod a+r $(PREFIX)/bin/SerialPort_linux.py chmod a+r $(PREFIX)/share/frprog/pkernel.mhx uninstall: rm -R $(PREFIX)/share/frprog rm $(PREFIX)/bin/frprog - rm $(PREFIX)/bin/SerialPort_linux.pyc + rm $(PREFIX)/bin/SerialPort_linux.py + +pylint: frprog.py + pylint --indent-string="\t" $< .PHONY: uninstall