refactor: use .SILENT directive instead of @ prefixes

Adds .SILENT directive to suppress command echoing for all targets,
replacing individual @ prefixes. Also moves TEST variable to top with
other variables for better organization.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
M.V. Hutz
2026-01-10 16:34:07 -05:00
parent 3158c35df2
commit 8f70bfbbdb

View File

@@ -1,38 +1,38 @@
BINARY_NAME=lambda BINARY_NAME=lambda
TEST=simple
.SILENT:
.PHONY: help it run profile explain graph clean .PHONY: help it run profile explain graph clean
help: help:
@ echo "Available targets:" echo "Available targets:"
@ echo " it - Build the lambda binary" echo " it - Build the lambda binary"
@ echo " run - Build and run with sample input (default: simple.txt)" echo " run - Build and run with sample input (default: simple.txt)"
@ echo " profile - Build and run with CPU profiling enabled" echo " profile - Build and run with CPU profiling enabled"
@ echo " explain - Run with explanation mode and profiling" echo " explain - Run with explanation mode and profiling"
@ echo " graph - Generate CPU profile visualization" echo " graph - Generate CPU profile visualization"
@ echo " clean - Remove build artifacts" echo " clean - Remove build artifacts"
@ echo "" echo ""
@ echo "Usage: make run TEST=<sample-name>" echo "Usage: make run TEST=<sample-name>"
it: it:
@ go build -o ${BINARY_NAME} ./cmd/lambda go build -o ${BINARY_NAME} ./cmd/lambda
TEST=simple
run: it run: it
@ ./lambda - < ./samples/$(TEST).txt > program.out ./lambda - < ./samples/$(TEST).txt > program.out
profile: it profile: it
@ mkdir -p profile mkdir -p profile
@ ./lambda -p profile/cpu.prof - < ./samples/$(TEST).txt > program.out ./lambda -p profile/cpu.prof - < ./samples/$(TEST).txt > program.out
explain: it explain: it
@ mkdir -p profile mkdir -p profile
@ ./lambda -x -p profile/cpu.prof - < ./samples/$(TEST).txt > program.out ./lambda -x -p profile/cpu.prof - < ./samples/$(TEST).txt > program.out
graph: profile graph: profile
@ go tool pprof -raw -output=profile/cpu.raw profile/cpu.prof go tool pprof -raw -output=profile/cpu.raw profile/cpu.prof
@ go tool pprof -svg profile/cpu.prof > profile/cpu.svg go tool pprof -svg profile/cpu.prof > profile/cpu.svg
@ echo "Profile graph saved to 'file://profile/cpu.svg'" echo "Profile graph saved to 'file://profile/cpu.svg'"
clean: clean:
rm -f ${BINARY_NAME} program.out rm -f ${BINARY_NAME} program.out