-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (30 loc) · 1.06 KB
/
Copy pathMakefile
File metadata and controls
39 lines (30 loc) · 1.06 KB
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
.PHONY: clean distclean
SWIPL?=swipl
SWIPL_PREFIX?=$(shell dirname $$(dirname $$(which ${SWIPL})))
all: scasp prolog/scasp/main.qlf
scasp:
${SWIPL} --no-pce --undefined=error -O -o scasp -c prolog/scasp/main.pl
prolog/scasp/main.qlf:
${SWIPL} qlf compile --include prolog/scasp/main.pl
TEST_SCAP=${SWIPL} test/test_scasp.pl --passed
check: check_load
$(TEST_SCAP) test/all_programs test/all_programs/sasp
$(TEST_SCAP) --dcc test/all_programs/dcc
# Verify consistency of main load points
check_load:
${SWIPL} -q -l prolog/scasp.pl -g check --on-warning=status -t halt
${SWIPL} -q -l prolog/scasp/main.pl -g check --on-warning=status -t halt
ifneq ($(strip $(SWIPL_PREFIX)),)
install:
@echo "Installing scasp in $(SWIPL_PREFIX)/bin/scasp"
ln -sf "$(CURDIR)/scasp" "$(SWIPL_PREFIX)/bin/scasp"
else
install:
@echo 'Warning: No $$SWIPL_PREFIX defined.'
@echo 'Warning: Too old Prolog or no writeable candidate'
@echo 'Warning: Could not install the scasp executable'
endif
clean:
@-find . -name "*~" -type f -delete
distclean: clean
${RM} scasp prolog/scasp/main.qlf