build: distribute IDE project trees per-directory to fix "make dist"#10951
Merged
Conversation
The non-recursive automake "distdir" recipe inlines the entire $(DISTFILES)
list into a single shell command. Enumerating every IDE integration file
individually made that list large enough (~123 KB) that the recipe exceeded
the Linux MAX_ARG_STRLEN (128 KB) single-argument exec limit, so "make dist"
failed with:
/bin/bash: Argument list too long
make[2]: *** [distdir-am] Error 127
Replace the per-file EXTRA_DIST enumeration of the IDE directories with one
wholesale "EXTRA_DIST += IDE/<dir>" entry per directory (automake copies the
tree recursively). This collapses ~745 file entries into ~52 directory
entries and shrinks the top-level DISTFILES from ~123 KB to ~97 KB, well
under the limit.
The set of distributed IDE files is unchanged: a before/after "make dist"
diff shows no project file added or removed (only the now-unused include.am
build fragments are gone). Three directories that intentionally omit some
tracked files (apple-universal, MPLABX16, Renesas - private IDE configs,
.gitkeep placeholders, helper scripts) stay enumerated file-by-file.
Contributor
|
retest this please |
douzzer
approved these changes
Jul 20, 2026
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.
Summary
make distcan fail on Linux with:This changes the
IDE/integration trees to be distributed one directory at a time (EXTRA_DIST += IDE/<dir>) instead of enumerating every file, shrinking the top-levelDISTFILESfrom ~123 KB to ~97 KB and gettingmake distwell clear of the limit. The set of files placed in the release tarball is unchanged.Root cause
wolfSSL uses a single non-recursive
Makefile.am, so every distributed file lands in one top-level$(DISTFILES). Automake'sdistdir-amrecipe inlines that entire list into a single shell command (list='$(DISTFILES)'; ...), whichmakepasses to/bin/bash -cas one argument. Linux caps a single argument atMAX_ARG_STRLEN(128 KB), independent of the 2 MB totalARG_MAX. WithDISTFILESsitting at ~123 KB, the recipe was right at that limit, so a modest addition ofEXTRA_DISTentries pushed it over andexecvereturnedE2BIG. macOS has no per-argument cap, which is why this only reproduces on Linux.Change
The
IDE/directories were enumerated file-by-file via 53include IDE/*/include.amfragments (~745EXTRA_DISTentries). Automake already copies a directory-valuedEXTRA_DISTentry recursively, andIDE/include.amalready used that form for a few trees (IDE/Espressif,IDE/HEXIWEAR, ...). This change extends it to the rest:EXTRA_DIST += IDE/<dir>entry per directory (~52 entries).include.amfragments.DISTCLEANFILESentry forIDE/iotsafe/build.Net effect on the top-level
DISTFILES:IDE/contributionThat leaves roughly 34 KB of headroom under the 128 KB limit.
Directories kept enumerated
Three directories intentionally omit some tracked files (private IDE configs,
.gitkeepplaceholders, helper scripts), so they stay listed file-by-file to avoid shipping those:IDE/apple-universal,IDE/MPLABX16, andIDE/Renesas.Why not a recursive
SUBDIRSSplitting
IDE/into a recursively-distributed subdirectory is the other textbook fix, but wolfSSL deliberately avoids recursivedistdir:linuxkm/Makefileis hand-written (not inAC_CONFIG_FILES), andMakefile.amdocuments that theSUBDIRS_OPTaux-variable exists specifically to keepmake distdirfrom recursing. Extending the wholesale-EXTRA_DISTidiom already present inIDE/include.amstays on-convention.Testing
make disttarball comparison: noIDE/project file added or removed. The only difference is that the 53 now-unusedinclude.ambuild fragments are no longer packaged.make distverified on Ubuntu 24.04 / automake 1.16.5 (matching theMultiple compilers and versionsCI toolchain).make distis expected to run from a clean checkout.Checklist
make distpasses on the CI toolchain.