svghmi/Makefile
author Edouard Tisserant <edouard.tisserant@gmail.com>
Tue, 17 Mar 2020 07:39:50 +0100
branchsvghmi
changeset 2873 022db76c3bff
parent 2872 83adf8859c55
child 2884 50b9832c51fc
permissions -rw-r--r--
SVGHMI : create hmi_tree.ysl2, rename bbox_intersect.ysl2 into geometry.ysl2 and move more code into. Add per included ysl2 file debug output.
#! gmake

# Makefile to generate XSLT stylesheets from ysl2 files in the same directory

# This uses YML2. 
#   hg clone https://pep.foundation/dev/repos/yml2/

# It should be just fine if yml2 is cloned just asside beremiz
# otherwise, point yml2path to yml2 source directory
#   make yml2path=path/to/yml/dir

yml2path ?= $(abspath ../../yml2)

ysl2files := gen_index_xhtml.ysl2
ysl2includes := geometry.ysl2 hmi_tree.ysl2
xsltfiles := $(patsubst %.ysl2, %.xslt, $(ysl2files))

all:$(xsltfiles)

%.xslt: %.ysl2 $(ysl2includes) svghmi.js ../yslt_noindent.yml2
	$(yml2path)/yml2c -I $(yml2path):../ $< -o $@.tmp
	xmlstarlet fo $@.tmp > $@
	rm $@.tmp
	
clean:
	rm -f $(xsltfiles)