Last active
August 25, 2019 06:22
-
-
Save naotaco/0f86a27f20fea844b4266f96cf2b4e1e to your computer and use it in GitHub Desktop.
Makefile for Re:View project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# directory contains .re files | |
CONTENTS_DIR := contents | |
# output files | |
BOOK_NAME := rust-embedded2 | |
OUT_PDF := $(BOOK_NAME).pdf | |
OUT_EPUB := $(BOOK_NAME).epub | |
# dependencies | |
SRCS := $(wildcard $(CONTENTS_DIR)/*.re) $(wildcard *.yml) $(wildcard sty/*.sty) $(wildcard sty/*.cls) | |
REVIEW_CONFIG := config.yml | |
# Command to pen PDF file ON WINDOWS | |
SHOW_PDF := explorer $(OUT_PDF) | |
.PHONY: all clean pdf epub | |
all: pdf epub | |
pdf: $(OUT_PDF) | |
epub: $(OUT_EPUB) | |
$(OUT_PDF): $(SRCS) | |
review pdfmaker $(REVIEW_CONFIG) | |
$(OUT_EPUB): $(SRCS) | |
review epubmaker $(REVIEW_CONFIG) | |
# short commands | |
p: pdf | |
ps: $(OUT_PDF) | |
$(SHOW_PDF) | |
e: epub | |
clean: | |
rm -rf $(OUT_PDF) | |
rm -rf $(OUT_EPUB) | |
rm -rf $(BOOK_NAME)-pdf/ | |
rm -rf $(BOOK_NAME)-epub/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment