This repository has been archived on 2024-05-19. You can view files and clone it, but cannot push or open issues or pull requests.
l-systems/Makefile

38 lines
937 B
Makefile
Raw Normal View History

2024-05-05 18:37:24 +02:00
CONVERTER = python converter.py
VALIDATE = xmllint --schema
SAXON = java -jar $(wildcard saxon*.jar)
RM = rm
2024-05-05 19:02:19 +02:00
ECHO = echo -e
2024-05-05 18:37:24 +02:00
SYSTEMS = l-systems
TORTUE = tortue
TRACEUR = traceur
SVG = svg
EXPORT = image
all: generation tortue traceur svg
generation:
$(CONVERTER) $(SYSTEMS).csv -o $(SYSTEMS).xml
$(VALIDATE) $(SYSTEMS).xsd $(SYSTEMS).xml 1>/dev/null
tortue:
2024-05-05 19:02:19 +02:00
ifeq ($(and $(nom),$(n)),)
@$(ECHO) "Il manque des arguments, par exemple :\n" \
" make $(MAKECMDGOALS) nom=snow n=3"
@false
endif
$(SAXON) -s:$(SYSTEMS).xml -xsl:$(TORTUE).xsl -o:$(TORTUE).xml nom=$(nom) n=$(n)
2024-05-05 18:37:24 +02:00
$(VALIDATE) $(TORTUE).xsd $(TORTUE).xml 1>/dev/null
traceur:
$(SAXON) -s:$(TORTUE).xml -xsl:$(TRACEUR).xsl -o:$(TRACEUR).xml
$(VALIDATE) $(TRACEUR).xsd $(TRACEUR).xml 1>/dev/null
svg:
$(SAXON) -s:$(TRACEUR).xml -xsl:$(SVG).xsl -o:$(EXPORT).svg
clean:
-$(RM) $(SYSTEMS).xml $(TORTUE).xml $(TRACEUR).xml $(EXPORT).svg