RACKET = racket
RACKET_VERSION = 9.2

platform:
	$(RACKET) -A build -l- raco pkg install -u --auto --skip-installed --catalog catalog/ rhombus-main-distribution
	# For v9.3 and later, using `--built` with `raco pkg catalog-archive` would be better than `find`+`rm`:
	find build/$(RACKET_VERSION)/pkgs -name 'synced.rktd' -exec rm {} \;
	$(RACKET) -l- pkg/dirs-catalog build/$(RACKET_VERSION)/catalog build/$(RACKET_VERSION)/pkgs
	$(RACKET) -l- raco pkg catalog-archive --relative build/rhombus-pkg-platform build/$(RACKET_VERSION)/catalog

install:
	$(RACKET) -l- raco pkg install -i --auto --catalog build/rhombus-pkg-platform/catalog/ rhombus-main-distribution
