plcopen/Makefile
author Edouard Tisserant
Wed, 25 Mar 2020 13:56:04 +0100
branchsvghmi
changeset 2898 a2910281fcb5
parent 2752 a8c9b7f0a54a
permissions -rw-r--r--
SVGHMI: Alow relative relative Jump. (i.e, relative jump from a foreach widget)
1353
fc7aab64589b Added makefile for generating xslt stylesheet from ysl2 files
Laurent Bessard
parents:
diff changeset
     1
#! gmake
fc7aab64589b Added makefile for generating xslt stylesheet from ysl2 files
Laurent Bessard
parents:
diff changeset
     2
2752
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
     3
# Makefile to generate XSLT stylesheets from ysl2 files in the same directory
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
     4
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
     5
# This uses YML2. 
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
     6
#   hg clone https://pep.foundation/dev/repos/yml2/
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
     7
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
     8
# It should be just fine if yml2 is cloned just asside beremiz
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
     9
# otherwise, point yml2path to yml2 source directory
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
    10
#   make yml2path=path/to/yml/dir
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
    11
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
    12
yml2path ?= $(abspath ../../yml2)
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
    13
1353
fc7aab64589b Added makefile for generating xslt stylesheet from ysl2 files
Laurent Bessard
parents:
diff changeset
    14
ysl2files := $(wildcard *.ysl2)
fc7aab64589b Added makefile for generating xslt stylesheet from ysl2 files
Laurent Bessard
parents:
diff changeset
    15
xsltfiles := $(patsubst %.ysl2, %.xslt, $(ysl2files))
fc7aab64589b Added makefile for generating xslt stylesheet from ysl2 files
Laurent Bessard
parents:
diff changeset
    16
fc7aab64589b Added makefile for generating xslt stylesheet from ysl2 files
Laurent Bessard
parents:
diff changeset
    17
all:$(xsltfiles)
fc7aab64589b Added makefile for generating xslt stylesheet from ysl2 files
Laurent Bessard
parents:
diff changeset
    18
2752
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
    19
%.xslt: %.ysl2 ../yslt_noindent.yml2
a8c9b7f0a54a Moved XSLT model query python code so that XSLT part can be reused for other transformations (i.e. in SVGHMI)
Edouard Tisserant
parents: 1936
diff changeset
    20
	$(yml2path)/yml2c -I $(yml2path):../ $< -o $@.tmp
1353
fc7aab64589b Added makefile for generating xslt stylesheet from ysl2 files
Laurent Bessard
parents:
diff changeset
    21
	xmlstarlet fo $@.tmp > $@
fc7aab64589b Added makefile for generating xslt stylesheet from ysl2 files
Laurent Bessard
parents:
diff changeset
    22
	rm $@.tmp
fc7aab64589b Added makefile for generating xslt stylesheet from ysl2 files
Laurent Bessard
parents:
diff changeset
    23
	
fc7aab64589b Added makefile for generating xslt stylesheet from ysl2 files
Laurent Bessard
parents:
diff changeset
    24
clean:
1936
b85b13b1c2ec YSLT auto indent trick is useless here, added yslt_noindent.yml2, regenerated XSLT files
Edouard Tisserant <edouard.tisserant@gmail.com>
parents: 1353
diff changeset
    25
	rm -f $(xsltfiles)