forked from Attempto/APE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (30 loc) · 1.37 KB
/
Makefile
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
29
30
31
32
33
34
35
36
37
38
39
# Unofficial Makefile for some tasks
# Tested only on Ubuntu Linux.
version = 6.7
text1 = "John likes Mary."
text2 = "Every man likes a car."
text3 = "1 / 2 ^ 3 ^ 4 = 1/8."
text4 = "If John likes Mary then 1 / 2 ^ 3 = 1/8."
text5 = "1 / 2 * 3 - 4 = 1/8."
all: help
help:
@echo Targets:
@echo
@echo " build: builds ape.exe"
@echo " doc: generates documentation"
@echo " clean: deletes automatically generatable files"
@echo " test: runs some tests"
@echo
build:
swipl -O -F none -g "working_directory(_, 'parser'), [fit_to_plp], halt." -t halt ; swipl -O -f ape.pl -g "qsave_program('ape.exe', [goal(ape), toplevel(halt), local(25000), global(50000)])." -t halt
clean:
rm -f *.exe *.toc parser/*.plp parser/*.html parser/*.toc
doc:
cat parser/grammar.fit parser/grammar_functionwords.fit parser/grammar_contentwords.fit | perl parser/make_syntax_report.perl
cat parser/grammar.fit parser/grammar_functionwords.fit parser/grammar_contentwords.fit | perl parser/make_syntax_report.perl --number $(version) > syntax_report.html
test:
./ape.exe -text $(text1) -cdrspp -cparaphrase -cowlfsspp -csyntax -csyntaxpp -csyntaxd -csyntaxdpp
./ape.exe -text $(text2) -cdrspp -cparaphrase -cowlfsspp
./ape.exe -text $(text3) -cdrspp -cparaphrase
./ape.exe -text $(text4) -solo owlfsspp
./ape.exe -text $(text5) -cdrspp -cparaphrase -cowlfsspp -csyntax -csyntaxpp -csyntaxd -csyntaxdpp