Compare commits
2 Commits
8b25dbdca2
...
af93017204
Author | SHA1 | Date | |
---|---|---|---|
af93017204 | |||
26ada96c25 |
10
makefile
10
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_DIR := $(wildcard content/*)
|
||||||
SRC_EXTENSION := .cho
|
SRC_EXTENSION := .cho
|
||||||
|
|
||||||
@ -9,10 +15,10 @@ SONGBOOK := songbook.pdf
|
|||||||
.DEFAULT_GOAL := all
|
.DEFAULT_GOAL := all
|
||||||
|
|
||||||
%.pdf: %$(SRC_EXTENSION)
|
%.pdf: %$(SRC_EXTENSION)
|
||||||
chordpro --config=chordpro.json -o $@ $<
|
$(CHORDPRO_CMD) -o $@ $<
|
||||||
|
|
||||||
%.html: %$(SRC_EXTENSION)
|
%.html: %$(SRC_EXTENSION)
|
||||||
chordpro --config=chordpro.json -o $@ $<
|
$(CHORDPRO_CMD) -o $@ $<
|
||||||
|
|
||||||
all: $(SONG_PDF) $(SONG_HTML) $(SONGBOOK)
|
all: $(SONG_PDF) $(SONG_HTML) $(SONGBOOK)
|
||||||
|
|
||||||
|
@ -4,6 +4,14 @@
|
|||||||
- `ghostscript`
|
- `ghostscript`
|
||||||
- `zola` (optional)
|
- `zola` (optional)
|
||||||
|
|
||||||
|
The makefile uses Docker with the official iamge `chordpro/chordpro:latest`.
|
||||||
|
It can be seamlesly integrated with a shell alias in case you want to use
|
||||||
|
chordpro directly in your shell outside of make:
|
||||||
|
|
||||||
|
```
|
||||||
|
alias chordpro="docker run -ti --rm --env HOME=\$HOME --env USER=\$USER --workdir \$(pwd) --volume \$HOME:\$HOME chordpro/chordpro:latest chordpro"
|
||||||
|
```
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
`make` defaults to `all` which builds individual PDF and HTML files for
|
`make` defaults to `all` which builds individual PDF and HTML files for
|
||||||
|
Loading…
Reference in New Issue
Block a user