diff --git a/makefile b/makefile index 4258e48..cf2117e 100644 --- a/makefile +++ b/makefile @@ -1,3 +1,9 @@ +ifdef CHORDPRO_PIPELINE + CHORDPRO_CMD = chordpro +else + CHORDPRO_CMD = docker run -ti --rm --env HOME=$(HOME) --env USER=$(USER) --workdir $(shell pwd) --volume $(HOME):$(HOME) chordpro/chordpro:latest chordpro --config=chordpro.json +endif + SRC_DIR := $(wildcard content/*) SRC_EXTENSION := .cho @@ -9,10 +15,10 @@ SONGBOOK := songbook.pdf .DEFAULT_GOAL := all %.pdf: %$(SRC_EXTENSION) - chordpro --config=chordpro.json -o $@ $< + $(CHORDPRO_CMD) -o $@ $< %.html: %$(SRC_EXTENSION) - chordpro --config=chordpro.json -o $@ $< + $(CHORDPRO_CMD) -o $@ $< all: $(SONG_PDF) $(SONG_HTML) $(SONGBOOK)