Skip to content

Commit

Permalink
chore(make): provide install.gnodev in root makefile (#1626)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
thehowl authored Feb 6, 2024
1 parent f6aba5c commit 95f9fc7
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 95f9fc7

Please sign in to comment.