Debian Codegraph @

Makefile

raw
1 all: README README.org
2
3 # a multiple-target pattern rule means that a single invocation of the command
4 # builds all the targets, which is what I want here
5 %EADME %EADME.org: gnuplotlib.py README.footer.org extract_README.py
6 python3 extract_README.py gnuplotlib
7
8 DIST_VERSION := $(or $(shell < gnuplotlib.py perl -ne "if(/__version__ = '(.*)'/) { print \$$1; exit}"), $(error "Couldn't parse the distribution version"))
9
10 DIST := dist/gnuplotlib-$(DIST_VERSION).tar.gz
11 $(DIST): README
12
13 # make distribution tarball
14 $(DIST):
15 python3 setup.py sdist
16 .PHONY: $(DIST) # rebuild it unconditionally
17
18 dist: $(DIST)
19 .PHONY: dist
20
21
22 # make and upload the distribution tarball
23 dist_upload: $(DIST)
24 twine upload --verbose $(DIST)
25 .PHONY: dist_upload
26
27
28 clean:
29 rm -f README.org README
30 .PHONY: clean
31