svghmi/Makefile
author Edouard Tisserant
Wed, 13 Nov 2019 11:21:04 +0100
branchsvghmi
changeset 2813 ac736a878188
parent 2798 ddb2c4668a6b
child 2872 83adf8859c55
permissions -rw-r--r--
Add FatalError() method to ConfigTreeNode.
Extensions can report error addressed to user, without a traceback.
#! 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 := $(wildcard *.ysl2)
xsltfiles := $(patsubst %.ysl2, %.xslt, $(ysl2files))

all:$(xsltfiles)

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