From 8c872b78f7e7c06ad1b66b23998dca78fc2c4e24 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Fri, 15 Dec 2017 02:35:08 +0100 Subject: Update makefile to count words and more text --- makefile | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 580145d..081d17b 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,6 @@ # file settings BUILD_DIR := build -DRAFT := lfc_draft.pdf -FINAL := lfc_final.pdf +DOC := lfc_draft.pdf # tex settings TEX := xelatex \ @@ -10,29 +9,20 @@ TEX := xelatex \ -output-directory=$(BUILD_DIR) # automated stuff -_DRAFT := $(BUILD_DIR)/$(DRAFT) -_DRAFT_SRC := $(patsubst %.pdf,%.tex,$(DRAFT)) - -_FINAL := $(BUILD_DIR)/$(FINAL) -_FINAL_SRC := $(patsubst %.pdf,%.tex,$(FINAL)) +_DOC := $(BUILD_DIR)/$(DOC) +_DOC_SRC := $(patsubst %.pdf,%.tex,$(DOC)) # recipes -.PHONY: build_dir count count_draft count_final -all: $(_DRAFT) - -$(_DRAFT): $(_DRAFT_SRC) build_dir - $(TEX) $< +.PHONY: build_dir count +all: $(DOC) count -$(_FINAL): $(_FINAL_SRC) build_dir +$(DOC): $(_DOC_SRC) build_dir $(TEX) $< -count: count_draft - -count_draft: $(_DRAFT_SRC) - texcount -char $< +count: $(_DOC_SRC) + texcount -letter $< | tee count.txt + texcount $< | tee -a count.txt -count_final: $(_FINAL_SRC) - texcount $< build_dir: mkdir -p $(BUILD_DIR) -- cgit v1.2.1