~sschwarzer/sudoku-solver

6af7ae990d41ba2567c0b7af306d0024c913e3a8 — Stefan Schwarzer 1 year, 24 days ago 880dc91
Add `.PHONY` annotations
1 files changed, 13 insertions(+), 0 deletions(-)

M Makefile
M Makefile => Makefile +13 -0
@@ 22,43 22,56 @@ build: patch
	raco cross --target "${TARGET}" --vm ${VM} -j 4 exe ${TARGET_OPTS} \
		-o "${EXE_PATH}" games/sudoku-solver.rkt

.PHONY : build-x86_64-linux
build-x86_64-linux: build

.PHONY : build-x86_64-win32
build-x86_64-win32:
	TARGET=x86_64-win32 NICE_TARGET=x86_64-windows make build

.PHONY : build-x86_64-macosx
build-x86_64-macosx:
	TARGET=x86_64-macosx make build

.PHONY : build-aarch64-macosx
build-aarch64-macosx:
	TARGET=aarch64-macosx make build

.PHONY : build-source
build-source:
	git archive -o build/sudoku-solver-${VERSION}.zip HEAD

# Create standalone binaries for different platforms.
.PHONY : build-all
build-all: build-x86_64-linux build-x86_64-win32 build-x86_64-macosx \
	build-aarch64-macosx build-source

.PHONY : patch
patch:
	sed -i 's/(define version .*/(define version "${VERSION}")/' info.rkt
	sed -i -E 's/^(- sudoku-solver.*-)[0-9]+\.[0-9]+\.[0-9]+(-pre)?(.*)/\1${VERSION}\3/' .build.yml

.PHONY : test
test:
	raco test games/sudoku-solver

.PHONY : tag
tag:
	git tag -a "v${VERSION}"

.PHONY : push
push:
	git push
	git push --tags

.PHONY : copy-to-releases
copy-to-releases:
	cp $(shell find build/ -name "sudoku-solver-${VERSION}-*") \
		../../releases/_site/sudoku-solver

# Upload to webspace.
.PHONY : upload
upload:

.PHONY : release
release: patch build-all tag push copy-to-releases upload