Update figures Makefile structure

This commit is contained in:
Eric-Teunis de Boone 2022-08-24 16:25:20 +02:00
parent 02647699df
commit faf07ef6fd
6 changed files with 49 additions and 14 deletions

7
figures/grand/Makefile Normal file
View file

@ -0,0 +1,7 @@
SUBDIRS := $(subst Makefile,,$(wildcard */Makefile))
all: $(SUBDIRS)
$(SUBDIRS):
@$(MAKE) -C $(@D)
.PHONY: all $(SUBDIRS)

View file

@ -1,21 +1,20 @@
# vim:ft=make
.PHONY: all clean
SRCDIR = $(shell pwd)/src
OUTPUTDIR = $(shell pwd)
SRCDIR = ./src
VPATH = $(SRCDIR)
SOURCES := $(patsubst ,$(SRCDIR),$(wildcard $(SRCDIR)/*.svg))
OBJECTS := $(patsubst %.svg,%.pdf,$(SOURCES))
SOURCES := $(wildcard $(SRCDIR)/*.svg)
OBJECTS := $(subst $(SRCDIR)/,,$(SOURCES))
OBJECTS_PDF := $(patsubst %.svg,%.pdf,$(OBJECTS))
OBJECTS_TEX := $(patsubst %.svg,%.pdf_tex,$(OBJECTS))
### Targets
all: $(OBJECTS)
all: $(OBJECTS_PDF) $(OBJECTS_TEX)
%.pdf: %.svg
$(OBJECTS_PDF): %.pdf: $(SRCDIR)/%.svg
inkscape --export-area-drawing --export-pdf="${@F}" "$^"
%.pdf_tex: %.svg
$(OBJECTS_TEX): %.pdf_tex: $(SRCDIR)/%.svg
inkscape --export-area-drawing --export-latex --export-pdf="${@F}" "$^"
clean: