-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.pl
28 lines (26 loc) · 837 Bytes
/
build.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
:- use_module(library(dcg/basics)).
:- use_module(prolog/ninja).
:- ['pack.pl'].
:- initialization(write_build(graph), main).
zipfile -->
{ version(V) },
"v", atom(V), ".zip".
graph -->
rule(doc, "swipl -t halt -s load.pl -g doc && touch docs"),
rule(test, "swipl -t halt -s load.pl -g test"),
rule(example, "swipl $in"),
rule(zip, "rm -rf ninja $out && mkdir ninja && cp -r $in ninja/ && zip -r $out ninja && rm -rf ninja"),
build("test", test, "prolog/ninja.pl"),
build(["docs", "docs/index.html"], doc, deps("load.pl"), [validations("test")]),
build(["example.ninja"], example, ["example.pl"]),
build(zipfile, zip, [
"docs",
"build.pl",
"LICENSE",
"load.pl",
"pack.pl",
"prolog/ninja.pl",
"README.md",
"example.pl",
"example.ninja",
".gitignore"], [validations("test")]).