Makefile
author Edouard Tisserant <edouard.tisserant@gmail.com>
Wed, 28 Apr 2021 23:40:51 +0200
changeset 78 0b05c2bce9e4
parent 77 5b23278ed81f
permissions -rw-r--r--
Fix expension of macros in pointers with default values.

For example :

in xsl decl widget_class(%name, *clsname="%nameWidget", match="widget[@type='%name']", mode="widget_class") alias template {
| class `text **clsname` extends Widget{
content;
| }
};

widget_class('Input');

gives now :

<xsl:template match="widget[@type='Input']" mode="widget_class">
<xsl:text>class </xsl:text>
<xsl:text>InputWidget</xsl:text>
<xsl:text> extends Widget{
</xsl:text>
<xsl:text>}
</xsl:text>
</xsl:template>

Without the fix, <xsl:text>InputWidget</xsl:text> would be <xsl:text>%nameWidget</xsl:text>
0
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     1
YML_PATH=
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     2
YML2C=yml2c
48
9e69f3056f4b Makefile: Add target `dist`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 45
diff changeset
     3
PKGVER=$(shell python setup.py -V)
0
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     4
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     5
all: homepage
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     6
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     7
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
     8
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     9
update: homepage format.css gpl-2.0.txt
77
5b23278ed81f updating documentation
Volker Birk <vb@pep-project.org>
parents: 49
diff changeset
    10
	rsync -avC *.html format.css *.yhtml2 gpl-2.0.txt samples dragon:fdik.org/yml2/
0
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-all: update yml2c yml2.py pyPEG.py backend.py yml2proc
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    13
	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
    14
	rsync -avC *.py yml2 yml2c Makefile yml2proc xml2yml.ysl2 standardlib.ysl2 samples dragon:fdik.org/yml2/
98a53c3282c3 Convert yml2 into a Python package.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 0
diff changeset
    15
	ssh dragon bash -c "cd ; cd fdik.org/; tar cvjf yml-$(VERSION).tar.bz2 yml2/{*.py,*.yml2,*.yhtml2,format.css,gpl-2.0.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
    16
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    17
%.html: %.en.yhtml2 heading.en.yhtml2 homepage.en.yhtml2
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    18
	$(YML2C) $< -o $@
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
clean:
41
98a53c3282c3 Convert yml2 into a Python package.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 0
diff changeset
    21
	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
    22
	rm -rf *.egg-info
48
9e69f3056f4b Makefile: Add target `dist`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 45
diff changeset
    23
9e69f3056f4b Makefile: Add target `dist`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 45
diff changeset
    24
9e69f3056f4b Makefile: Add target `dist`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 45
diff changeset
    25
dist: dist/yml-$(PKGVER).tar.gz
9e69f3056f4b Makefile: Add target `dist`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 45
diff changeset
    26
9e69f3056f4b Makefile: Add target `dist`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 45
diff changeset
    27
dist/yml-$(PKGVER).tar.gz:
9e69f3056f4b Makefile: Add target `dist`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 45
diff changeset
    28
	python setup.py sdist
49
6e781b10c5a4 Makefile: Add target `install`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 48
diff changeset
    29
6e781b10c5a4 Makefile: Add target `install`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 48
diff changeset
    30
install:
6e781b10c5a4 Makefile: Add target `install`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 48
diff changeset
    31
	pip install .
6e781b10c5a4 Makefile: Add target `install`.
Hartmut Goebel <h.goebel@crazy-compilers.com>
parents: 48
diff changeset
    32
	rm setup.py