Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lint.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,22 @@
# Self-initializing (via the rule below) so `make lint` works right after a
# plain `git clone`, with no --recurse-submodules needed, and so CI can rely
# on the exact same entry point a developer would use locally.
#
# Guarded on .git existing: a source tarball (git archive, PGXN's own dist
# step) has no .git and no submodule content, so `git submodule update`
# fails outright ("fatal: not a git repository") -- and because Make tries
# to satisfy every `include` before doing anything else, for any target
# requested, an unconditional include here aborted EVERY make invocation
# (make, make install, everything), not just make lint, the moment a real
# consumer built from a distribution tarball rather than a git checkout.
# Confirmed by building a real `git archive` tarball into a clean directory
# with no .git at all and running a plain `make` there. Outside a real git
# checkout, lint support is simply unavailable; nothing else in the build
# needs it -- `make lint` there now fails with Make's own "no rule to make
# target" instead of `make`/`make install` failing too.
ifneq ($(wildcard .git),)
.vendor/linter/lint.mk:
git submodule update --init -- .vendor/linter

include .vendor/linter/lint.mk
endif