diff --git a/.gitignore b/.gitignore index 2a91a2b..20aee56 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ pdf/ +*.pdf diff --git a/Makefile.book b/Makefile.book new file mode 100644 index 0000000..eb1593a --- /dev/null +++ b/Makefile.book @@ -0,0 +1,17 @@ +TARGET = book.pdf +SRCDIR = src + +PANDOC = pandoc +PFLAGS = + +SRCS = $(sort $(wildcard $(SRCDIR)/*.md)) + +.PHONY: all +all: $(TARGET) + +.PHONY: clean +clean: + $(RM) -r $(TARGET) + +$(TARGET): $(SRCS) + $(PANDOC) $(PFLAGS) $^ -o $@ diff --git a/Makefile b/Makefile.notes similarity index 79% rename from Makefile rename to Makefile.notes index 22acbb3..95b8706 100644 --- a/Makefile +++ b/Makefile.notes @@ -2,7 +2,7 @@ PDFDIR = pdf SRCDIR = src PANDOC = pandoc -PANDOCFLAGS = -f markdown -t latex +PFLAGS = SRCS = $(shell find $(SRCDIR) -type f -iname '*.md') PDFS = $(patsubst $(SRCDIR)/%.md,$(PDFDIR)/%.pdf,$(SRCS)) @@ -16,4 +16,4 @@ clean: $(PDFDIR)/%.pdf: $(SRCDIR)/%.md @mkdir -p $(@D) - $(PANDOC) $(PANDOCFLAGS) $< -o $@ + $(PANDOC) $(PFLAGS) $< -o $@