summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--makespec.py9
2 files changed, 6 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index fc47464..02a845d 100644
--- a/Makefile
+++ b/Makefile
@@ -188,8 +188,8 @@ spec: spec.html
echo "Link to missing anchor #$$link"; \
done
-spec.html: spec.txt template.html
- python3 makespec.py $< html > $@
+spec.html: spec.txt template.html ${PROG}
+ python3 makespec.py html > $@
spec.pdf: spec.md template.tex specfilter.hs
pandoc -s $< --template template.tex \
diff --git a/makespec.py b/makespec.py
index 07bf453..2361636 100644
--- a/makespec.py
+++ b/makespec.py
@@ -4,14 +4,13 @@ import sys
from subprocess import *
from string import Template
-if len(sys.argv) == 3:
- specfile = sys.argv[1]
- specformat = sys.argv[2]
+if len(sys.argv) == 2:
+ specformat = sys.argv[1]
if not (specformat in ["html", "markdown"]):
sys.stderr.write("Format must be html or markdown\n")
exit(1)
else:
- sys.stderr.write("Usage: makespec.py SPECFILE [html|markdown]\n")
+ sys.stderr.write("Usage: makespec.py [html|markdown]\n")
exit(1)
def toIdentifier(s):
@@ -51,7 +50,7 @@ lastnum = []
finishedMeta = False
yamllines = []
-with open(specfile, 'r', encoding='utf-8') as spec:
+with open('spec.txt', 'r', encoding='utf-8') as spec:
for ln in spec:
if not finishedMeta:
yamllines.append(ln)