From 5c055707309d0a94a344a291ef222862efead960 Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Tue, 29 Sep 2015 23:08:46 +0200 Subject: Only convert SVG to Asymptote/DXF if necessary. Instead of always converting all SVG files to both Asymptote and DXF, only the formats which may be used as dependencies are compiled. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8965e61..3956961 100644 --- a/Makefile +++ b/Makefile @@ -73,7 +73,7 @@ GLOBAL_DEPS := Makefile $(wildcard config.mk settings.mk) EXISTING_TARGETS := $(filter $(SVG_DXF_FILES) $(SCAD_DXF_FILES) $(SCAD_STL_FILES) $(SVG_ASY_FILES) $(ASY_PDF_FILES) $(GENERATED_FILES) $(DEPENDENCY_FILES),$(EXISTING_FILES)) # Goal to build Everything. Also generates files which aren't compiled to anything else. Deined here to make it the default goal. -all: generated dxf stl asy pdf +all: generated $(SCAD_DXF_FILES) $(SCAD_STL_FILES) $(ASY_PDF_FILES) # Everything^-1. clean: @@ -84,14 +84,15 @@ clean: generated: $(GENERATED_FILES) dxf: $(SVG_DXF_FILES) $(SCAD_DXF_FILES) stl: $(SCAD_STL_FILES) -pdf: $(ASY_PDF_FILES) asy: $(SVG_ASY_FILES) +pdf: $(ASY_PDF_FILES) # Rule to convert an SVG file to a DXF file. $(SVG_DXF_FILES): %.dxf: %.svg $(GLOBAL_DEPS) echo [inkscape] $@ $(INKSCAPE_CMD) $< $@ +# Rule to export an SVG file to an Asymptote file. $(SVG_ASY_FILES): %.asy: %.svg $(GLOBAL_DEPS) echo [inkscape] $@ $(INKSCAPE_CMD) $< $@ @@ -106,7 +107,7 @@ $(SCAD_STL_FILES): %.stl: %.scad $(GLOBAL_DEPS) | $(SCAD_ORDER_DEPS) echo [openscad] $@ $(OPENSCAD_CMD) $< $@ -# Rule to export an SVG file to an Asymptote file. +# Rule to compile an Asymptote file to a PDF file. $(ASY_PDF_FILES): %.pdf: %.asy $(GLOBAL_DEPS) | $(ASY_DEPS) echo [asymptote] $@ $(ASYMPTOTE_CMD) $< $@ -- cgit