Makefile
changeset 62 00a196f8d14a
parent 60 b19d0a86651b
child 65 d659b8c2ed22
equal deleted inserted replaced
61:482106d33bf6 62:00a196f8d14a
       
     1 YML_PATH  =
       
     2 DEBVER   := 1
     1 PYTHON   := python3
     3 PYTHON   := python3
     2 YML_PATH  =
       
     3 YML2C     = yml2c
       
     4 DEBVER   := 1
       
     5 PKGVER    = $(shell $(PYTHON) setup.py -V)
     4 PKGVER    = $(shell $(PYTHON) setup.py -V)
     6 TWINE    := $(PYTHON) -m twine
     5 TWINE    := $(PYTHON) -m twine
       
     6 YML2C     = $(PYTHON) yml2c
     7 
     7 
     8 all: homepage
     8 all: homepage
     9 
     9 
    10 homepage: index.html features.html yslt.html toolchain.html programming.html hello.html
    10 homepage: index.html features.html yslt.html toolchain.html programming.html hello.html
    11 
    11 
    12 update: homepage format.css gpl-2.0.txt
    12 update: homepage format.css COPYING.txt
    13 	rsync -avC *.html *.yml2 format.css *.yhtml2 gpl-2.0.txt samples dragon:fdik.org/yml2/
    13 	rsync -avC *.html *.yml2 format.css *.yhtml2 COPYING.txt samples dragon:fdik.org/yml2/
    14 
    14 
    15 update-all: update yml2c yml2.py pyPEG.py backend.py yml2proc
    15 update-all: update yml2c yml2.py pyPEG.py backend.py yml2proc
    16 	if test -z $(VERSION) ; then echo VERSION not set ; exit 1 ; fi
    16 	if test -z $(VERSION) ; then echo VERSION not set ; exit 1 ; fi
    17 	rsync -avC *.py yml2c Makefile yml2proc xml2yml.ysl2 standardlib.ysl2 samples dragon:fdik.org/yml2/
    17 	rsync -avC *.py yml2 yml2c Makefile yml2proc xml2yml.ysl2 standardlib.ysl2 samples dragon:fdik.org/yml2/
    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"
    18 	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"
    19 
    19 
    20 %.html: %.en.yhtml2 heading.en.yhtml2 homepage.en.yhtml2
    20 %.html: %.en.yhtml2 heading.en.yhtml2 homepage.en.yhtml2
    21 	$(YML2C) $< -o $@
    21 	$(YML2C) $< -o $@
    22 
    22 
    23 .PHONY: deb
    23 .PHONY: deb
    30 python-yml2_$(PKGVER)-$(DEBVER)_all.deb:
    30 python-yml2_$(PKGVER)-$(DEBVER)_all.deb:
    31 	$(PYTHON) setup.py --command-packages=stdeb.command bdist_deb
    31 	$(PYTHON) setup.py --command-packages=stdeb.command bdist_deb
    32 	mv -f deb_dist/python-yml2_$(PKGVER)-$(DEBVER)_all.deb .
    32 	mv -f deb_dist/python-yml2_$(PKGVER)-$(DEBVER)_all.deb .
    33 
    33 
    34 clean:
    34 clean:
    35 	rm -f *.html *.pyc *.pyo
    35 	rm -f *.html *.pyc *.pyo */*.pyc */*.pyo
       
    36 	rm -rf *.egg-info
    36 	rm -f YML2_$(PKGVER).orig.tar.gz
    37 	rm -f YML2_$(PKGVER).orig.tar.gz
    37 	rm -f python-yml2_$(PKGVER)-$(DEBVER)_all.deb
    38 	rm -f python-yml2_$(PKGVER)-$(DEBVER)_all.deb
    38 
    39 
    39 .PHONY: dist
    40 .PHONY: dist dist/YML2-$(PKGVER).tar.gz
    40 dist: dist/YML2-$(PKGVER).tar.gz
    41 dist: dist/YML2-$(PKGVER).tar.gz
    41 	$(TWINE) check $<
    42 	$(TWINE) check $<
    42 
    43 
    43 dist/YML2-$(PKGVER).tar.gz:
    44 dist/YML2-$(PKGVER).tar.gz:
    44 	$(PYTHON) setup.py sdist
    45 	$(PYTHON) setup.py sdist
    45 	ls -lh dist/YML2-$(PKGVER).tar.gz
       
    46 
    46 
       
    47 install:
       
    48 	pip install .
       
    49