svghmi/Makefile
branchsvghmi
changeset 2753 9a7e12e96399
child 2798 ddb2c4668a6b
equal deleted inserted replaced
2752:a8c9b7f0a54a 2753:9a7e12e96399
       
     1 #! gmake
       
     2 
       
     3 # Makefile to generate XSLT stylesheets from ysl2 files in the same directory
       
     4 
       
     5 # This uses YML2. 
       
     6 #   hg clone https://pep.foundation/dev/repos/yml2/
       
     7 
       
     8 # It should be just fine if yml2 is cloned just asside beremiz
       
     9 # otherwise, point yml2path to yml2 source directory
       
    10 #   make yml2path=path/to/yml/dir
       
    11 
       
    12 yml2path ?= $(abspath ../../yml2)
       
    13 
       
    14 ysl2files := $(wildcard *.ysl2)
       
    15 xsltfiles := $(patsubst %.ysl2, %.xslt, $(ysl2files))
       
    16 
       
    17 all:$(xsltfiles)
       
    18 
       
    19 %.xslt: %.ysl2 ../yslt_noindent.yml2
       
    20 	$(yml2path)/yml2c -I $(yml2path):../ $< -o $@.tmp
       
    21 	xmlstarlet fo $@.tmp > $@
       
    22 	rm $@.tmp
       
    23 	
       
    24 clean:
       
    25 	rm -f $(xsltfiles)