summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2017-12-15 02:35:08 +0100
committerNao Pross <naopross@thearcway.org>2017-12-15 02:35:08 +0100
commit8c872b78f7e7c06ad1b66b23998dca78fc2c4e24 (patch)
tree000721f6055b6778db542c1e192d5e6f15fa146e /makefile
parentCant work here (diff)
downloadLFC-8c872b78f7e7c06ad1b66b23998dca78fc2c4e24.tar.gz
LFC-8c872b78f7e7c06ad1b66b23998dca78fc2c4e24.zip
Update makefile to count words and more text
Diffstat (limited to 'makefile')
-rw-r--r--makefile28
1 files changed, 9 insertions, 19 deletions
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)