Makefile
author Claudio Luck <claudio.luck@pep.foundation>
Thu, 19 Mar 2020 17:17:22 +0100
changeset 66 701c5e980f33
parent 65 d659b8c2ed22
permissions -rw-r--r--
read version from setup.cfg
62
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 60
diff changeset
     1
YML_PATH  =
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 60
diff changeset
     2
DEBVER   := 1
60
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
     3
PYTHON   := python3
66
701c5e980f33 read version from setup.cfg
Claudio Luck <claudio.luck@pep.foundation>
parents: 65
diff changeset
     4
PKGVER    = $(shell awk '/^version/ {print $$3}' setup.cfg)
60
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
     5
TWINE    := $(PYTHON) -m twine
66
701c5e980f33 read version from setup.cfg
Claudio Luck <claudio.luck@pep.foundation>
parents: 65
diff changeset
     6
TWINEREP := pypi
62
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 60
diff changeset
     7
YML2C     = $(PYTHON) yml2c
0
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     8
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     9
all: homepage
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    10
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    11
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
    12
62
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 60
diff changeset
    13
update: homepage format.css COPYING.txt
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 60
diff changeset
    14
	rsync -avC *.html *.yml2 format.css *.yhtml2 COPYING.txt samples dragon:fdik.org/yml2/
0
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    15
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    16
update-all: update yml2c yml2.py pyPEG.py backend.py yml2proc
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    17
	if test -z $(VERSION) ; then echo VERSION not set ; exit 1 ; fi
41
98a53c3282c3 Convert yml2 into a Python package.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 0
diff changeset
    18
	rsync -avC *.py yml2 yml2c Makefile yml2proc xml2yml.ysl2 standardlib.ysl2 samples dragon:fdik.org/yml2/
62
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 60
diff changeset
    19
	ssh dragon bash -c "cd ; cd fdik.org/; tar cvjf yml-$(VERSION).tar.bz2 yml2/{*.py,*.yml2,*.yhtml2,format.css,COPYING.txt,yml2,yml2c,Makefile,yml2proc,xml2yml.ysl2,standardlib.ysl2,samples} ; rm yml2.tar.bz2 ; ln -s yml-$(VERSION).tar.bz2 yml2.tar.bz2"
0
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    20
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    21
%.html: %.en.yhtml2 heading.en.yhtml2 homepage.en.yhtml2
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    22
	$(YML2C) $< -o $@
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    23
56
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    24
.PHONY: deb
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    25
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
    26
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    27
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
    28
	python setup.py sdist
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    29
	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
    30
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    31
python-yml2_$(PKGVER)-$(DEBVER)_all.deb:
60
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    32
	$(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
    33
	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
    34
0
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    35
clean:
41
98a53c3282c3 Convert yml2 into a Python package.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 0
diff changeset
    36
	rm -f *.html *.pyc *.pyo */*.pyc */*.pyo
45
4ac3bb01f0bc Add setup.py, setup.cfg and MANIFEST.in.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 41
diff changeset
    37
	rm -rf *.egg-info
56
d48cf08cf448 wip: add setup.py, README.md and debian packaging
Claudio Luck <claudio.luck@pep.foundation>
parents: 55
diff changeset
    38
	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
    39
	rm -f python-yml2_$(PKGVER)-$(DEBVER)_all.deb
66
701c5e980f33 read version from setup.cfg
Claudio Luck <claudio.luck@pep.foundation>
parents: 65
diff changeset
    40
	rm -f dist/YML2-$(PKGVER).tar.gz
48
9e69f3056f4b Makefile: Add target `dist`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 45
diff changeset
    41
66
701c5e980f33 read version from setup.cfg
Claudio Luck <claudio.luck@pep.foundation>
parents: 65
diff changeset
    42
sdist-pypi: dist/YML2-$(PKGVER).tar.gz
60
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    43
	$(TWINE) check $<
48
9e69f3056f4b Makefile: Add target `dist`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 45
diff changeset
    44
66
701c5e980f33 read version from setup.cfg
Claudio Luck <claudio.luck@pep.foundation>
parents: 65
diff changeset
    45
upload-pypi: sdist-pypi
701c5e980f33 read version from setup.cfg
Claudio Luck <claudio.luck@pep.foundation>
parents: 65
diff changeset
    46
	$(TWINE) upload --repository "$(TWINEREP)" $<
701c5e980f33 read version from setup.cfg
Claudio Luck <claudio.luck@pep.foundation>
parents: 65
diff changeset
    47
701c5e980f33 read version from setup.cfg
Claudio Luck <claudio.luck@pep.foundation>
parents: 65
diff changeset
    48
.PHONY: dist/YML2-$(PKGVER).tar.gz
60
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    49
dist/YML2-$(PKGVER).tar.gz:
b19d0a86651b make PyPI package
Claudio Luck <claudio.luck@pep.foundation>
parents: 56
diff changeset
    50
	$(PYTHON) setup.py sdist
49
6e781b10c5a4 Makefile: Add target `install`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 48
diff changeset
    51
6e781b10c5a4 Makefile: Add target `install`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 48
diff changeset
    52
install:
66
701c5e980f33 read version from setup.cfg
Claudio Luck <claudio.luck@pep.foundation>
parents: 65
diff changeset
    53
	pip install -e .
62
00a196f8d14a Merge 2.6.3
Claudio Luck <claudio.luck@pep.foundation>
parents: 60
diff changeset
    54