aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-05-28 18:43:02 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-05-28 18:43:02 -0400
commit84aed252dd24fc62cfec4b877edd5c8e90e43035 (patch)
tree11bfdb7a69b0ae7f8a738ff09db9650685090dd9 /configure
parentd1fcf6fb400ef1dab7d988354b4ca48614e93420 (diff)
parentd6ed0246fef2253ad8f4c4e98fcf27c016bdbd37 (diff)
Merge branch 'configure'
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure b/configure
new file mode 100755
index 0000000..2e56ed4
--- /dev/null
+++ b/configure
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+python3 --version >/dev/null || ( echo "Install python3" && exit 1 )
+pdftex --version >/dev/null || ( echo "Install pdftex (TeXLive)" && exit 1 )
+make -v >/dev/null || ( echo "Install make" && exit 1 )
+python -c "import numpy" >/dev/null || ( echo "Install numpy" && exit 1 )
+python -c "import scipy" >/dev/null || ( echo "Install scipy" && exit 1 )
+python -c "import matplotlib" >/dev/null || ( echo "Install matplotlib" && exit 1 )
+gs --version >/dev/null || echo "Ghostscript not installed (no PNG poster)"
+
+cp Makefile.orig Makefile
+
+for tgt in */document.tex; do
+ DIR=$(dirname $tgt)
+ ( echo -en "\n${DIR}/document.pdf: ${DIR}/document.tex "; find $DIR \!\
+ -type d \! -name "document.tex" -a -name "*.tex" -exec echo {} +; ) >> Makefile
+done
+
+for gen in gen/*.orig.tex; do
+ BASE=$(basename $gen .orig.tex)
+ echo "gen/${BASE}.tex: gen/make${BASE}.sh gen/${BASE}.orig.tex" >> Makefile
+ echo -e "\t$<\n" >> Makefile
+done