forked from coq-community/math-classes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConstruct
22 lines (14 loc) · 846 Bytes
/
SConstruct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
env = DefaultEnvironment(ENV = os.environ, tools=['default', 'Coq'])
(vs, vos, globs) = env.SConscript(dirs='.')
env['COQFLAGS'] = Rs = ' -R . MathClasses '
Default('implementations', 'theory', 'categories', 'orders', 'varieties', 'misc', 'functors')
env.CoqDoc(env.Dir('coqdoc'), vs, COQDOCFLAGS='-utf8 --toc -g --no-lib-name http://coq.inria.fr/library')
# Todo: Do "patch --backup $TARGET/coqdoc.css ../tools/coqdoc.css.diff", including the dependency on the .diff file.
# Note: The generated documentation is no good, because of Coq bug #2423.
vs_string = ' '.join(map(str, vs))
os.system('coqdep ' + Rs + vs_string + ' > deps')
ParseDepends('deps')
open('coqidescript', 'w').write('#!/bin/sh\ncoqide ' + Rs + ' $@ \n')
os.chmod('coqidescript', 0755)
env.Command('deps.dot', [], '../tools/DepsToDot.hs < deps > $TARGET')