PACKAGENAME=preserves
COLLECTS=preserves preserves-schema

all: setup

clean:
	find . -name compiled -type d | xargs rm -rf

setup:
	raco setup $(COLLECTS)

link:
	raco pkg install --link -n $(PACKAGENAME) $$(pwd)

unlink:
	raco pkg remove $(PACKAGENAME)

test: setup testonly

testonly: update-test-data
	raco test -p $(PACKAGENAME)

update-test-data:
	rsync ../../../tests/samples.pr preserves/tests
