build: restore existing lint Makefile (defer to concurrent agent)
ober
bf7cbf559809f43e31404ccb20d092d7f6d70f48
--- a/Makefile +++ b/Makefile @@ -1,26 +1,14 @@ -# jerboa-gerbil — Gerbil tooling to port jerboa-emacs features to gerbil-emacs. -# -# convert.ss is both a Gerbil module (:jerboa-gerbil/convert) and a gxi script. -# GERBIL_LOADPATH must include the parent directory so the :jerboa-gerbil -# package resolves to this checkout. - GXI ?= gxi -GERBIL_LOADPATH ?= $(CURDIR)/.. -.PHONY: test lint clean +# Parent of the package dir, so :jerboa-gerbil/convert resolves on the loadpath. +REPO_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) +LOADPATH := $(dir $(REPO_DIR)) -# Syntax/expand check: importing the module fails non-zero on any parse or -# macro-expansion error in convert.ss. -lint: - GERBIL_LOADPATH="$(GERBIL_LOADPATH)" $(GXI) -e '(import :jerboa-gerbil/convert)' +.PHONY: test lint -# Smoke test: run the converter on a sample import and assert the rename applied. test: - @printf '(import :jerboa-emacs/foo)\n' > .gerbil-test-in.ss - @GERBIL_LOADPATH="$(GERBIL_LOADPATH)" $(GXI) convert.ss .gerbil-test-in.ss > .gerbil-test-out.ss 2>/dev/null - @grep -q '(import :gemacs/foo)' .gerbil-test-out.ss - @rm -f .gerbil-test-in.ss .gerbil-test-out.ss - @echo "jerboa-gerbil: test ok" + GERBIL_LOADPATH='$(LOADPATH)' $(GXI) test/convert-test.ss -clean: - rm -f .gerbil-test-in.ss .gerbil-test-out.ss +lint: + GERBIL_LOADPATH='$(LOADPATH)' $(GXI) -e '(import :jerboa-gerbil/convert)' \ + -e '(displayln "lint OK: convert.ss loads and expands cleanly")'