-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
52 lines (39 loc) · 1.67 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
40
41
42
43
44
45
46
47
48
49
50
51
52
# Tested only on Ubuntu Linux.
# For Windows builds use make_exe.bat
SHELL=/bin/bash
swipl = swipl
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 " plp: compiles fit-files into plp-files"
@echo "install: builds ape.exe"
@echo " build: (deprecated: use install)"
@echo " doc: generates documentation"
@echo " clean: deletes automatically generatable files"
@echo " test: runs some tests"
@echo
build:
$(swipl) -O -F none -g "working_directory(_, 'prolog/parser'), [fit_to_plp], halt." -t halt ; $(swipl) -O -f ape.pl -g "qsave_program('ape.exe', [goal(ape), toplevel(halt)])." -t halt
plp:
$(swipl) -O -F none -g "working_directory(_, 'prolog/parser'), [fit_to_plp], halt." -t halt
install: plp
$(swipl) -O -f ape.pl -g "qsave_program('ape.exe', [goal(ape), toplevel(halt)])." -t halt
check:
clean:
rm -f *.exe *.toc prolog/parser/*.{plp,html,toc}
doc:
cat prolog/parser/{grammar,grammar_functionwords,grammar_contentwords}.fit | perl prolog/parser/make_syntax_report.perl
cat prolog/parser/{grammar,grammar_functionwords,grammar_contentwords}.fit | perl prolog/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