aboutsummaryrefslogtreecommitdiff
path: root/assignments/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'assignments/Makefile')
-rw-r--r--assignments/Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/assignments/Makefile b/assignments/Makefile
index 24208f2..864864e 100644
--- a/assignments/Makefile
+++ b/assignments/Makefile
@@ -1,13 +1,17 @@
-AS=blink-a-led
+AS=blink-a-led mqtt
PDFS=$(foreach A,$(AS),$(A)/$(A).pdf)
all: README.pdf $(PDFS)
README.pdf: README.md
-$(eval $(foreach A,$(AS),$(A)/$(A).pdf: $(A)/$(A).md))
+define A_PATTERN
+$(1)/$(1).pdf: $(1)/$(1).md
+endef
+$(eval $(foreach A,$(AS),$(call $(A_PATTERN),$(A))))
%.pdf: %.md
- cd $(dir $<); pandoc $(notdir $<) -o $(notdir $@)
+ @echo pandoc $<
+ @cd $(dir $<); pandoc $(notdir $<) -o $(notdir $@)
#$(patsubst )/%,%,$<) -o $(patsubst $(DIR)/%,%,$@)