Permalink
Browse files

Makefile: Add a bunch of targets and parameters. PATCH WELCOME to mak…

…e dependency handling work.
  • Loading branch information...
1 parent 53c34de commit 7c4548b88003f567141b341435bbbd093de84935 @pettter pettter committed Oct 20, 2012
Showing with 21 additions and 6 deletions.
  1. +21 −6 src/Makefile
View
@@ -1,10 +1,25 @@
-all: tex combined
+BUILD_DIR=build
+INSTALL_DIR=/path/to/install
+
+TEX_DIR=${BUILD_DIR}/tex
+BOOK_DIR=${BUILD_DIR}/.
+
+all: latex-pdf combined
tex:
- ./convert_to_tex.sh
- pdflatex main.tex
- pdflatex main.tex
+ ./convert_to_tex.sh ${TEX_DIR}
+ cp main.tex ${TEX_DIR}
+
+latex-pdf: tex
+ pdflatex --output-dir=${TEX_DIR} ${TEX_DIR}/main.tex
+ pdflatex --output-dir=${TEX_DIR} ${TEX_DIR}/main.tex
+
+book.md:
+ cat chapter*/*.md > ${BOOK_DIR}/book.md
+
+combined: book.md
-combined:
- cat */*.md > book.md
+install: book.md latex-pdf
+ cp ${TEX_DIR}/main.pdf ${INSTALL_DIR}/cryptoparty-handbook-`date +%F`.pdf
+ cp ${BOOK_DIR}/book.md ${INSTALL_DIR}/cryptoparty-handbook-`date +%F`.md

0 comments on commit 7c4548b

Please sign in to comment.