Skip to content
Snippets Groups Projects
Makefile 815 B
Newer Older
Gabriel's avatar
Gabriel committed
PVS2DK = ../pvs2dk.sh
Gabriel's avatar
Gabriel committed
LP     = lambdapi
Gabriel's avatar
Gabriel committed

hondet's avatar
hondet committed
PVSPATH  ?=
Gabriel's avatar
Gabriel committed

hondet's avatar
hondet committed
_THEORIES != ../purify.pl -p < theories
_DUMMIES  != ../purify.pl -n < theories
# We cannot cat _THEORIES and _DUMMIES because order is important
_ALL      != ../purify.pl < theories
Gabriel's avatar
Gabriel committed

hondet's avatar
hondet committed
all: ${_ALL:C/$/.lpo/}
translate: ${_ALL:C/$/.lp/}
Gabriel's avatar
Gabriel committed

hondet's avatar
hondet committed
.for d in ${_DUMMIES}
${d}.lp:
	set -o noclobber && printf '// Dummy theory\n' > ${d}.lp
${d}.lisp:
	set -o noclobber && printf '(:context nil :decls nil)' > ${d}.lisp
.endfor
Gabriel's avatar
Gabriel committed

# For each theory, translate it and apply a patch if it exists
hondet's avatar
hondet committed
.for th in ${_THEORIES}
Gabriel's avatar
Gabriel committed
${th}.lp:
	PVSPATH=${PVSPATH} ${PVS2DK} -f ${PVSPATH}/lib/prelude.pvs -t ${.TARGET:R} \
-o ${PWD}/${.TARGET} > /dev/null
Gabriel's avatar
Gabriel committed
	-[ -r "${.TARGET}.patch" ] && patch < "${.TARGET}.patch"
	-[ -r "${.TARGET}.sh" ] && sh "${.TARGET}.sh"
.endfor

.include "../lambdapi.mk"