diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-27 23:22:01 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-27 23:49:37 -0600 |
commit | 88adb90f5e805bea27e619fd5209ef58dbff6fd1 (patch) | |
tree | c3e24877b40ce183f1d72f6e064b0478ecf92207 /Makefile | |
parent | 89761191a98f7dce4d1049b9a84c3d645378222a (diff) |
Factor out a libhw
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -104,17 +104,14 @@ lint/all: lint/%: if ! grep -q 'Copyright (C) 2024 Luke T. Shumaker' $$filename; then \ echo "$$filename is missing a copyright statement"; r=1; \ fi; \ - dscname=$$($(get_dscname) $$filename); \ - filename_alt1=$$(echo "$$filename" | sed \ - -e 's,^cmd/,,' \ + dscname_act=$$($(get_dscname) $$filename); \ + dscname_exp=$$(echo "$$filename" | sed \ -e 's,.*/config/,,' \ - -e 's,.*/include/,,' \ + -e 's,.*include/,,' \ -e 's,^lib9p/idl/,,' \ -e 's/\.wip$$//'); \ - filename_alt2=$$(echo "$$filename_alt1" | sed \ - -e 's,^sbc_harness/hw/,hw/,'); \ - if ! { [ "$$dscname" == "$$filename" ] || [ "$$dscname" == "$$filename_alt1" ] || [ "$$dscname" == "$$filename_alt2" ]; }; then \ - echo "$$filename self-identifies as $$dscname"; r=1; \ + if [ "$$dscname_act" != "$$dscname_exp" ] && [ "cmd/$$dscname_act" != "$$dscname_exp" ]; then \ + echo "$$filename self-identifies as $$dscname_act (expected $$dscname_exp)"; r=1; \ fi; \ if grep -n --color=auto "$$(printf '\\S\t')" $$filename; then \ echo "$$filename uses tabs for alignment"; r=1; \ |