aboutsummaryrefslogtreecommitdiff
path: root/assignments/Makefile
blob: e1ec335e873ec4295562e07f83a3ce81b282634e (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
26
AS = 
AS += blink-a-led
AS += mqtt
AS += mqtt2
AS += mqtt3
AS += read-a-button
AS += read-temperature

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)/%,%,$@)