42 lines
1.4 KiB
Makefile
42 lines
1.4 KiB
Makefile
|
MIXTAPE_DIR := mixtape
|
||
|
CLASSIC_DIR := classic
|
||
|
SRC_EXTENSION := .cho
|
||
|
|
||
|
MIXTAPE_FILES := $(wildcard $(MIXTAPE_DIR)/*$(SRC_EXTENSION))
|
||
|
CLASSIC_FILES := $(wildcard $(CLASSIC_DIR)/*$(SRC_EXTENSION))
|
||
|
|
||
|
MIXTAPE_PDF := $(patsubst $(MIXTAPE_DIR)/%$(SRC_EXTENSION), $(MIXTAPE_DIR)/%.pdf, $(MIXTAPE_FILES))
|
||
|
CLASSIC_PDF := $(patsubst $(CLASSIC_DIR)/%$(SRC_EXTENSION), $(CLASSIC_DIR)/%.pdf, $(CLASSIC_FILES))
|
||
|
|
||
|
MIXTAPE_HTML := $(patsubst $(MIXTAPE_DIR)/%$(SRC_EXTENSION), $(MIXTAPE_DIR)/%.html, $(MIXTAPE_FILES))
|
||
|
CLASSIC_HTML := $(patsubst $(CLASSIC_DIR)/%$(SRC_EXTENSION), $(CLASSIC_DIR)/%.html, $(CLASSIC_FILES))
|
||
|
|
||
|
MIXTAPE_SONGBOOK := mixtape.pdf
|
||
|
CLASSIC_SONGBOOK := classic.pdf
|
||
|
|
||
|
.DEFAULT_GOAL := all
|
||
|
|
||
|
$(MIXTAPE_DIR)/%.pdf: $(MIXTAPE_DIR)/%$(SRC_EXTENSION)
|
||
|
chordpro -o $@ $<
|
||
|
|
||
|
$(MIXTAPE_DIR)/%.html: $(MIXTAPE_DIR)/%$(SRC_EXTENSION)
|
||
|
chordpro -o $@ $<
|
||
|
|
||
|
$(CLASSIC_DIR)/%.pdf: $(CLASSIC_DIR)/%$(SRC_EXTENSION)
|
||
|
chordpro -o $@ $<
|
||
|
|
||
|
$(CLASSIC_DIR)/%.html: $(CLASSIC_DIR)/%$(SRC_EXTENSION)
|
||
|
chordpro -o $@ $<
|
||
|
|
||
|
all: $(MIXTAPE_PDF) $(MIXTAPE_HTML) $(CLASSIC_PDF) $(CLASSIC_HTML) $(MIXTAPE_SONGBOOK) $(CLASSIC_SONGBOOK)
|
||
|
|
||
|
$(MIXTAPE_SONGBOOK): $(MIXTAPE_PDF)
|
||
|
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$@ $^
|
||
|
|
||
|
$(CLASSIC_SONGBOOK): $(CLASSIC_PDF)
|
||
|
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$@ $^
|
||
|
|
||
|
.PHONY: clean
|
||
|
clean:
|
||
|
rm -f $(MIXTAPE_PDF) $(MIXTAPE_HTML) $(CLASSIC_PDF) $(CLASSIC_HTML) $(MIXTAPE_SONGBOOK) $(CLASSIC_SONGBOOK)
|