diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-17 13:33:51 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-17 13:33:51 -0600 |
commit | 42fb27570262b52e2ca889030c621b5f4af76fe1 (patch) | |
tree | 1d70f96baa5089f8878a9c121ff0770846ad4090 /GNUmakefile | |
parent | 18ddce6270391e5c1924394f8b5d8079ad73289e (diff) | |
parent | 556f3ff6ccb9fa4b193d91216f85e8ade33b4383 (diff) |
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/GNUmakefile b/GNUmakefile index e5e59b2..9836b33 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -57,12 +57,19 @@ generate/files += build-aux/sources.mk ifeq ($(INNER),) nonsource/files = $(generate/files) nonsource/files += 3rd-party/COPYING.wiznet-dhcp.txt +# 100644 blob/regular file +# 100755 blob/executable file +# 120000 blob/symlink +# 160000 commit (submodule) +# 040000 tree (directory) build-aux/sources.mk: $(if $(wildcard .git),FORCE) - git ls-files | grep -vFx $(foreach f,$(nonsource/files),-e $f) \ - | sed 's,^,$(CURDIR)/,' | xargs editorconfig \ - | sed -nE -e 's,\[$(CURDIR)/(.*)\],\1,p' -e 's/^_mode=//p' \ - | sed -E '{N;s/(.*)\n(.*)/sources_\2 += \1/;}' \ - | sort \ + git ls-files --format='%(objectmode) %(path)' \ + | sed -n 's/^100... //p' \ + | grep -vFx $(foreach f,$(nonsource/files),-e $f) \ + | sed 's,^,$(CURDIR)/,' | xargs editorconfig \ + | sed -nE -e 's,\[$(CURDIR)/(.*)\],\1,p' -e 's/^_mode=//p' \ + | sed -E '{N;s/(.*)\n(.*)/sources_\2 += \1/;}' \ + | sort \ >$@.tmp if ! cmp -s $@.tmp $@; then mv $@.tmp $@; fi @echo '################################################################################' @@ -117,7 +124,7 @@ lint: lint/bin: build build-aux/lint-bin ./build-aux/lint-bin $(foreach t,$(build_types),build/rp2040-$t/cmd/sbc_harness/sbc_harness.elf) lint/all: lint/%: build-aux/lint-generic build-aux/get-dscname - ./build-aux/lint-generic '%s\n' $(sources_$*) + ./build-aux/lint-generic $(sources_$*) lint/unknown: lint/%: build-aux/lint-unknown ./build-aux/lint-unknown $(sources_$*) .PHONY: lint lint/% |