plcopen/Makefile
author Edouard Tisserant
Mon, 08 Nov 2021 14:06:29 +0100 (2021-11-08)
changeset 3385 18621ce81f5f
parent 2627 3ba6a2d26507
permissions -rw-r--r--
SVGHMI: Changes /CURRENT_PAGE_* behaviour to prevent problem whith multiclient : all clients were switching page when one was jumping.
- now PLC have to prefix page name with "!" to order page switch.
- HMI do not prefix with "!" when jumping, this avoiding looping incidently
- In case of multiple client:
CURRENT_PAGE reflects current page of last client hwo did jump
Setting CURRENT_PAGE with "!" affects all clients simultaneously
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
2627
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
Edouard Tisserant
parents: 1936
diff changeset
     3
# Makefile to generate XSLT stylesheets from ysl2 files in the same directory
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
Edouard Tisserant
parents: 1936
diff changeset
     4
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
Edouard Tisserant
parents: 1936
diff changeset
     5
# This uses YML2. 
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
Edouard Tisserant
parents: 1936
diff changeset
     6
#   hg clone https://pep.foundation/dev/repos/yml2/
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
Edouard Tisserant
parents: 1936
diff changeset
     7
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
Edouard Tisserant
parents: 1936
diff changeset
     8
# It should be just fine if yml2 is cloned just asside beremiz
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
Edouard Tisserant
parents: 1936
diff changeset
     9
# otherwise, point yml2path to yml2 source directory
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
Edouard Tisserant
parents: 1936
diff changeset
    10
#   make yml2path=path/to/yml/dir
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
Edouard Tisserant
parents: 1936
diff changeset
    11
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
Edouard Tisserant
parents: 1936
diff changeset
    12
yml2path ?= $(abspath ../../yml2)
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
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
2627
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
Edouard Tisserant
parents: 1936
diff changeset
    19
%.xslt: %.ysl2 ../yslt_noindent.yml2
3ba6a2d26507 Moved XSLT model query python code so that XSLT part can be reused for other transformations
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)