Makefile
author Claudio Luck <claudio.luck@pep.foundation>
Thu, 19 Mar 2020 14:53:28 +0100
changeset 60 b19d0a86651b
parent 56 d48cf08cf448
child 62 00a196f8d14a
permissions -rw-r--r--
make PyPI package
60
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
     1
PYTHON   := python3
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
     2
YML_PATH  =
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
     3
YML2C     = yml2c
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
     4
DEBVER   := 1
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
     5
PKGVER    = $(shell $(PYTHON) setup.py -V)
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
     6
TWINE    := $(PYTHON) -m twine
0
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     7
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     8
all: homepage
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     9
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    10
homepage: index.html features.html yslt.html toolchain.html programming.html hello.html
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    11
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    12
update: homepage format.css gpl-2.0.txt
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    13
	rsync -avC *.html *.yml2 format.css *.yhtml2 gpl-2.0.txt samples dragon:fdik.org/yml2/
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    14
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    15
update-all: update yml2c yml2.py pyPEG.py backend.py yml2proc
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    16
	if test -z $(VERSION) ; then echo VERSION not set ; exit 1 ; fi
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    17
	rsync -avC *.py yml2c Makefile yml2proc xml2yml.ysl2 standardlib.ysl2 samples dragon:fdik.org/yml2/
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    18
	ssh dragon bash -c "cd ; cd fdik.org/; tar cvjf yml-$(VERSION).tar.bz2 yml2/{*.py,*.yml2,*.yhtml2,format.css,gpl-2.0.txt,yml2c,Makefile,yml2proc,xml2yml.ysl2,standardlib.ysl2,samples} ; rm yml2.tar.bz2 ; ln -s yml-$(VERSION).tar.bz2 yml2.tar.bz2"
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    19
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    20
%.html: %.en.yhtml2 heading.en.yhtml2 homepage.en.yhtml2
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    21
	$(YML2C) $< -o $@
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    22
56
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    23
.PHONY: deb
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    24
deb:  YML2_$(PKGVER).orig.tar.gz python-yml2_$(PKGVER)-$(DEBVER)_all.deb
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    25
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    26
YML2_$(PKGVER).orig.tar.gz:
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    27
	python setup.py sdist
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    28
	mv -f dist/YML2-$(PKGVER).tar.gz YML2_$(PKGVER).orig.tar.gz
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    29
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    30
python-yml2_$(PKGVER)-$(DEBVER)_all.deb:
60
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    31
	$(PYTHON) setup.py --command-packages=stdeb.command bdist_deb
56
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    32
	mv -f deb_dist/python-yml2_$(PKGVER)-$(DEBVER)_all.deb .
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    33
0
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    34
clean:
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    35
	rm -f *.html *.pyc *.pyo
56
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    36
	rm -f YML2_$(PKGVER).orig.tar.gz
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    37
	rm -f python-yml2_$(PKGVER)-$(DEBVER)_all.deb
60
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    38
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    39
.PHONY: dist
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    40
dist: dist/YML2-$(PKGVER).tar.gz
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    41
	$(TWINE) check $<
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    42
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    43
dist/YML2-$(PKGVER).tar.gz:
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    44
	$(PYTHON) setup.py sdist
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    45
	ls -lh dist/YML2-$(PKGVER).tar.gz
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    46