Created
June 27, 2019 16:18
-
-
Save mpickering/a756ea7219f9e182c2e5f266a7fa80d4 to your computer and use it in GitHub Desktop.
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
.PHONY: all $(SOURCE_NAMES) lhs compile build-dir | |
### Constants ### | |
BUILD := build | |
PAPER := implicits | |
OUTPUT := $(BUILD)/$(PAPER).pdf | |
LHS := $(shell find src -type f -name '*.lhs') | |
SOURCES := $(shell find src -type f -name 'Main.lhs') | |
SOURCE_NAMES := $(SOURCES:%.lhs=%) | |
all: $(OUTPUT) | |
build-dir: | |
mkdir -p $(BUILD) | |
### Final pdf ### | |
$(OUTPUT): $(SOURCE_NAMES) build-dir | |
texfot --no-stderr latexmk -interaction=nonstopmode -pdf -no-shell-escape -bibtex -jobname=$(BUILD)/$(PAPER) $(BUILD)/Main.tex | |
### lhs2tex ### | |
lhs: $(SOURCE_NAMES) | |
$(SOURCE_NAMES): build-dir $(LHS) | |
@echo "lhs2TEX: Compiling [email protected]" | |
@lhs2TeX -P "src:" [email protected] -o $(BUILD)/$(notdir $@).tex | |
compile: | |
cabal new-build generic-lens-paper | |
clean: | |
rm -rf $(BUILD) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment