CONVERTER = python converter.py VALIDATE = xmllint --schema SAXON = java -jar $(wildcard saxon*.jar) RM = rm ECHO = echo -e 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: 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) $(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