From c9e35def19b4f7c0753180ac395eb0f009b0ac60 Mon Sep 17 00:00:00 2001 From: Jeremy Steward Date: Mon, 22 Apr 2024 21:29:41 -0600 Subject: [PATCH 2/3] Add chicken-lint to Makefile / clean up makefile Some of the commands were a bit ??? so I did a bit of cleanup on the Makefile. --- Makefile | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index d613d59..7deea33 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,37 @@ -CHICKEN_CLEAN := chicken-clean -CHICKEN_INSTALL := chicken-install -SALMONELLA := salmonella -SALMONELLA_LOG := salmonella.log -SALMONELLA_LOG_VIEWER := salmonella-log-viewer -SRFI := srfi-143.scm -TEST_NEW_EGG := test-new-egg +CHICKEN_CLEAN := chicken-clean +CHICKEN_INSTALL := chicken-install +CHICKEN_LINT := chicken-lint +CSI := csi +SALMONELLA := salmonella +SALMONELLA_LOG := salmonella.log +SALMONELLA_LOG_VIEWER := salmonella-log-viewer +SRFI := srfi-143.sld +MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) +PWD := $(dir $(MKFILE_PATH)) +SCHEME_FILES := srfi-143-impl.scm srfi-143.sld tests/run.scm -all: test +.PHONY: all clean compile lint salmonella test view print-% +all: lint test clean: $(CHICKEN_CLEAN) rm -f $(SALMONELLA_LOG) compile: - $(CHICKEN-INSTALL) -n + $(CHICKEN_INSTALL) -n + +lint: + $(CHICKEN_LINT) -I $(PWD) -X r7rs -R r7rs $(SCHEME_FILES) + +test: compile + $(CSI) -setup-mode -ns tests/run.scm salmonella: $(SALMONELLA) -test: - $(CHICKEN_INSTALL) -n -test - view: $(SALMONELLA_LOG_VIEWER) $(SALMONELLA_LOG) + +## Debugging make-vars, call `make print-MYVAR` +print-%: + @echo "$*=$($*)" -- 2.43.0