Repository navigation
fix(sbom.mk): start recipe lines without a literal tab - #52
Merged
Merged
Conversation
The wolfSSL source-text check rejects hard tabs in *.mk files. A product that vendors share/ (wolfSSL PR 11701) fails that check on tools/sbom/build/sbom.mk. Start each recipe line in wolfssl_compliance_tooling_sbom_rule with $(SBOM_TAB). $(call) expands it to a tab before $(eval) parses the rule, so make reads the same recipe. Indent the continuation lines with spaces. The driver arguments and the error checks do not change (checked with GNU make 3.81).
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the SBOM makefile’s literal-tab removal.
No open issues 🎉
What changed in this PR
Removes literal tabs from the shared SBOM makefile so it can pass wolfSSL’s Jenkins source-text check when vendored, while preserving recipe behavior and GNU make 3.81 compatibility.
Changes:
- Introduces
SBOM_TABto generate recipe-leading tabs during macro expansion. - Replaces literal tabs with
$(SBOM_TAB)at recipe starts and spaces on continuation lines, without using.RECIPEPREFIX.
| File | Description |
|---|---|
share/build/sbom.mk |
Removes literal tabs while preserving SBOM recipe commands and arguments. |
Review effort: Balanced
5 tasks
Frauschi
reviewed
Oct 29, 2026
Frauschi
left a comment
Member
There was a problem hiding this comment.
I ran the old and new sbom.mk against a stub driver on make 3.81 and 4.4.1. Driver arguments, error messages and exit codes match, so the 4.x gap from the description is covered. A few small things inline.
Nothing in this repo kept sbom.mk free of tabs, and no test ran it. A new recipe line with a tab passed CI here and failed only in the wolfSSL source-text check after a re-sync. tests/test_sbom_mk.py fails on any tab in sbom.mk. When make is on PATH, it runs the default target and a second $(call) target against a stub driver. It checks the driver arguments, the shell arithmetic in SBOM_CFLAGS, and the three error messages. SBOM_TAB is now an override, and sbom.mk stops with an error when $(shell printf '\t') is empty. Before, a shell without printf or SBOM_TAB=x on the command line gave "missing separator" for every make that includes the file. The comment now says why the file has no tabs.
sameehj
force-pushed
the
fix/sbom-mk-no-hard-tabs
branch
from
November 2, 2026 07:31
be440f9 to
9a2dd6e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The wolfSSL Jenkins source-text check rejects hard tabs in
*.mkfiles. wolfSSL PR wolfSSL/wolfssl#11701 vendorsshare/intotools/sbom/, and the check fails ontools/sbom/build/sbom.mk. Other wolfSSL.mkfiles are in folders that the check skips (for exampleIDE/), sosbom.mkis the first.mkfile that the check examines.Change
wolfssl_compliance_tooling_sbom_rulestarts with$(SBOM_TAB), not a literal tab.SBOM_TAB := $(shell printf '\t').$(call)expands it before$(eval)parses the rule, so make reads the same recipe.The file has no tab characters now. It does not use
.RECIPEPREFIX, so it still works with GNU make 3.81 (the macOS make).Test
I ran the old and new
sbom.mkwith a stub driver that prints its arguments, with GNU make 3.81, in these cases:SBOM_SRCS,$$(( ))inSBOM_CFLAGS,SBOM_DEP_VERSION, and wolfssl/wolfcrypt version detection$(eval $(call ...,sbom-hal,SBOM_HAL_)), withSBOM_HAL_LIBand withSBOM_HAL_NO_ARTIFACT_HASH=1NO_ARTIFACT_HASHcombined withSRCSorLIBThe driver arguments, the error messages, and the exit codes were the same in all cases. I did not test with GNU make 4.x.
Follow-up
After this PR merges, wolfSSL/wolfssl#11701 must re-pin
tools/sbom/.wolfssl-compliance-tooling-revto the commit on master.