aboutsummaryrefslogtreecommitdiff
path: root/assignments/Makefile
blob: ad3e8be2aa5b00f537b66863e3ff4d269866dcbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
AS = 
AS += blink-a-led
AS += read-temperature
AS += mqtt
AS += mqtt2
AS += mqtt3

PDFS=$(foreach A,$(AS),$(A)/$(A).pdf)

all: README.pdf $(PDFS)

README.pdf: README.md
define A_PATTERN
$(1)/$(1).pdf: $(1)/$(1).md
endef
$(eval $(foreach A,$(AS),$(call $(A_PATTERN),$(A))))

clean:
	@rm -f $(wildcard $(PDFS))

%.pdf: %.md
	@echo pandoc $<
	@pandoc --resource-path=$(dir $<) -f markdown -o $@ < $<

#$(patsubst )/%,%,$<) -o $(patsubst $(DIR)/%,%,$@)