#
INKSCAPE=inkscape
INKSCAPE_FLAGS=-z
+INKSCAPE_OUTPUT=>>./inkscape.log 2>&1
SVG_TO_PDF=-A
SVG_TO_EPS=-E
SVG_TO_PNG=-e
@mkdir $(PDFDIR)
@echo "Done"
%.pdf: %.svg
- ${INKSCAPE} ${INKSCAPE_FLAGS} ${SVG_TO_PDF} $(PDFDIR)/$@ $<
+ ${INKSCAPE} ${INKSCAPE_FLAGS} ${SVG_TO_PDF} $(PDFDIR)/$@ $< $(INKSCAPE_OUTPUT)
#
# EPS images creation
vpath %.pdf $(PDFDIR)
@mkdir $(EPSDIR)
@echo "Done"
%.eps: %.svg
- ${INKSCAPE} ${INKSCAPE_FLAGS} ${SVG_TO_EPS} $(EPSDIR)/$@ $<
+ ${INKSCAPE} ${INKSCAPE_FLAGS} ${SVG_TO_EPS} $(EPSDIR)/$@ $< $(INKSCAPE_OUTPUT)
#
# PNG images creation
vpath %.png $(PNGDIR)
@mkdir $(PNGDIR)
@echo "Done"
%.png: %.svg
- ${INKSCAPE} ${INKSCAPE_FLAGS} ${SVG_TO_PNG} $(PNGDIR)/$@ $<
+ ${INKSCAPE} ${INKSCAPE_FLAGS} ${SVG_TO_PNG} $(PNGDIR)/$@ $< $(INKSCAPE_OUTPUT)
+
+clean:
+ @echo " "
+ @echo "Cleaning all generated images..."
+ @rm -rf $(PDFDIR)
+ @rm -rf $(PNGDIR)
+ @rm -rf $(EPSDIR)
+ @echo "All generated images cleaned."
+ @echo "Deleting log files"
+ @rm -f *.log
+ @echo "Everything cleaned up"
+
+distclean: clean
\ No newline at end of file