svghmi/Makefile
author Edouard Tisserant <edouard.tisserant@gmail.com>
Mon, 23 May 2022 18:10:13 +0200
changeset 3476 46a7aac382ef
parent 3468 3725487d5468
child 3484 32eaba9cf30e
permissions -rw-r--r--
IDE: Workaround exception caused by dead C/C++ swig-wrapped object when debug still try to update view after close.
#! 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 gen_dnd_widget_svg.ysl2 analyse_widget.ysl2
ysl2includes := $(filter-out $(ysl2files), $(wildcard *.ysl2))
xsltfiles := $(patsubst %.ysl2, %.xslt, $(ysl2files))

jsfiles := svghmi.js sprintf.js

all:$(xsltfiles)

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