File: Makefile

package info (click to toggle)
python-gnuplotlib 0.39-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,264 kB
  • sloc: python: 2,238; lisp: 101; makefile: 32
file content (31 lines) | stat: -rw-r--r-- 786 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
all: README README.org

# a multiple-target pattern rule means that a single invocation of the command
# builds all the targets, which is what I want here
%EADME %EADME.org: gnuplotlib.py README.footer.org extract_README.py
	python3 extract_README.py gnuplotlib

DIST_VERSION := $(or $(shell < gnuplotlib.py perl -ne "if(/__version__ = '(.*)'/) { print \$$1; exit}"), $(error "Couldn't parse the distribution version"))

DIST := dist/gnuplotlib-$(DIST_VERSION).tar.gz
$(DIST): README

# make distribution tarball
$(DIST):
	python3 setup.py sdist
.PHONY: $(DIST) # rebuild it unconditionally

dist: $(DIST)
.PHONY: dist


# make and upload the distribution tarball
dist_upload: $(DIST)
	twine upload --verbose $(DIST)
.PHONY: dist_upload


clean:
	rm -f README.org README
.PHONY: clean