From 95f9fc764f225d7f389686535ef2f4b4d6d0ca66 Mon Sep 17 00:00:00 2001 From: Morgan Date: Tue, 6 Feb 2024 22:05:38 +0100 Subject: [PATCH] chore(make): provide install.gnodev in root makefile (#1626) cc/ @leohhhn Since from what I understood we're going to direct users to install `gnodev` as part of getting started, let's add it as a command in the top level Makefile? I also took the chance to make everything [PHONY](https://makefiletutorial.com/#phony). --- Makefile | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index dc3f8e47089..15fef433b75 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,37 @@ .PHONY: help help: @echo "Available make commands:" - @cat Makefile | grep '^[a-z][^:]*:' | cut -d: -f1 | sort | sed 's/^/ /' + @cat Makefile | grep '^[a-z][^:]*:' | grep -v 'install_' | cut -d: -f1 | sort | sed 's/^/ /' rundep=go run -modfile misc/devdeps/go.mod .PHONY: install -install: install_gnokey install_gno +install: install.gnokey install.gno + @if ! command -v gnodev > /dev/null; then \ + echo ------------------------------; \ + echo "For local realm development, gnodev is recommended: https://docs.gno.land/gno-tooling/cli/gno-tooling-gnodev"; \ + echo "You can install it by calling 'make install.gnodev'"; \ + fi # shortcuts to frequently used commands from sub-components. -install_gnokey: +.PHONY: install.gnokey +install.gnokey: $(MAKE) --no-print-directory -C ./gno.land install.gnokey @echo "[+] 'gnokey' is installed. more info in ./gno.land/." -install_gno: +.PHONY: install.gno +install.gno: $(MAKE) --no-print-directory -C ./gnovm install @echo "[+] 'gno' is installed. more info in ./gnovm/." +.PHONY: install.gnodev +install.gnodev: + $(MAKE) --no-print-directory -C ./contribs install.gnodev + @echo "[+] 'gnodev' is installed." + +# old aliases +.PHONY: install_gnokey +install_gnokey: install.gnokey +.PHONY: install_gno +install_gno: install.gno .PHONY: test test: test.components test.docker