Skip to content

fix(build): repair autotools gen-sbom discovery in sbom.am - #6

Open
MarkAtwood wants to merge 2 commits into
masterfrom
fix/autotools-gen-sbom-discovery
Open

fix(build): repair autotools gen-sbom discovery in sbom.am#6
MarkAtwood wants to merge 2 commits into
masterfrom
fix/autotools-gen-sbom-discovery

Conversation

@MarkAtwood

Copy link
Copy Markdown

Fixes #3. $(MAKEFILE_LIST) can't locate the fragment under Automake's textual include, so SBOM_GEN resolved to <builddir>/gen-sbom and make sbom broke. Replaced with an explicit SBOM_VENDOR_DIR (default $(srcdir)/tools/sbom) and restored the WOLFSSL_DIR fallback. Independent of the other review PRs.

sameehj and others added 2 commits July 23, 2026 15:54
Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
$(dir $(lastword $(MAKEFILE_LIST))) cannot locate this fragment:
Automake's include is textual, so at make time MAKEFILE_LIST is the top
Makefile and SBOM_GEN resolved to <builddir>/gen-sbom, breaking
`make sbom` unless every product overrode SBOM_GEN.

Name the vendored directory explicitly (SBOM_VENDOR_DIR, default
$(srcdir)/tools/sbom) and restore the WOLFSSL_DIR fallback for the
wolfSSH-style route. Empty when neither exists so the recipe's
`test -f "$(SBOM_GEN)"` fails with a clear error.

Fixes #3

Fixes #3

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes autotools SBOM generation (make sbom) by replacing the unreliable $(MAKEFILE_LIST)-based gen-sbom discovery (which doesn’t work with Automake’s textual include) with an explicit vendored tooling directory and reinstating the WOLFSSL_DIR fallback path for wolfSSL-based consumers.

Changes:

  • Replace SBOM_AM_DIR/$(MAKEFILE_LIST) self-location logic with an explicit SBOM_VENDOR_DIR (default $(srcdir)/tools/sbom).
  • Update SBOM_GEN default resolution to prefer the vendored gen-sbom, otherwise fall back to $(WOLFSSL_DIR)/scripts/gen-sbom.
  • Expand in-file documentation to explain why self-discovery is not possible under Automake include semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken autotools gen-sbom discovery in sbom.am (make sbom fails)

3 participants