refactor: improve Makefile structure and usability #11
8
Makefile
8
Makefile
@@ -1,7 +1,7 @@
|
|||||||
BINARY_NAME=lambda
|
BINARY_NAME=lambda
|
||||||
TEST=simple
|
TEST=simple
|
||||||
|
|
||||||
.PHONY: help build run profile explain graph docs
|
.PHONY: help build run profile explain graph docs clean
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
.SILENT:
|
.SILENT:
|
||||||
|
|
||||||
@@ -13,6 +13,7 @@ help:
|
|||||||
echo " explain - Build and run with explanation mode and profiling"
|
echo " explain - Build and run with explanation mode and profiling"
|
||||||
echo " graph - Generate and open CPU profile visualization"
|
echo " graph - Generate and open CPU profile visualization"
|
||||||
echo " docs - Start local godoc server on port 6060"
|
echo " docs - Start local godoc server on port 6060"
|
||||||
|
echo " clean - Remove all build artifacts"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build -o ${BINARY_NAME} ./cmd/lambda
|
go build -o ${BINARY_NAME} ./cmd/lambda
|
||||||
@@ -35,3 +36,8 @@ graph:
|
|||||||
docs:
|
docs:
|
||||||
echo ">>> View at 'http://localhost:6060/pkg/git.maximhutz.com/max/lambda/'"
|
echo ">>> View at 'http://localhost:6060/pkg/git.maximhutz.com/max/lambda/'"
|
||||||
go run golang.org/x/tools/cmd/godoc@latest -http=:6060
|
go run golang.org/x/tools/cmd/godoc@latest -http=:6060
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f ${BINARY_NAME}
|
||||||
|
rm -f program.out
|
||||||
|
rm -rf profile/
|
||||||
|
|||||||
Reference in New Issue
Block a user