From 86a1b0aaea889b4561610f25498b50530e56cde3 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 20 Jan 2022 02:10:35 -0500 Subject: [PATCH] Add config mechanism in Makefile --- .gitignore | 1 + Makefile | 8 +++++++- default-config.mk | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 default-config.mk diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6896ef6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/config.mk diff --git a/Makefile b/Makefile index fee26db..2d41dcc 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ +include: config.mk + .PHONY: serve test clean instantiate -JULIA_CMD = julia --color=yes --startup-file=no +JULIA ?= julia +JULIA_CMD ?= $(JULIA) --color=yes --startup-file=no serve: instantiate bin/serve @@ -13,3 +16,6 @@ clean: instantiate: $(JULIA_CMD) -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()' + +config.mk: + ln -s default-config.mk $@ diff --git a/default-config.mk b/default-config.mk new file mode 100644 index 0000000..53f471b --- /dev/null +++ b/default-config.mk @@ -0,0 +1 @@ +JULIA = julia1.6