From 1d984973581d7c03bc90954f3b0a5a7d84fdfa58 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sun, 27 Sep 2026 12:23:32 +0200 Subject: [PATCH] THRIFT-6380: Keep configure and build output out of the source tarball Client: build Directories that EXTRA_DIST names whole also carry what configure, the build and rebar3 left in them, so the 0.25.0 tarball shipped lib/d/src/base.o, config.h, 25 configured Makefiles and test/erl/_build. dist-hook now removes them. Co-Authored-By: Claude Opus 5.5 --- Makefile.am | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.am b/Makefile.am index 5bdc3af7bc0..a0e09681f5a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -68,6 +68,14 @@ dist-hook: find $(distdir) -type d -name node_modules -prune -exec rm -rf {} + find $(distdir) -type d -name __pycache__ -prune -exec rm -rf {} + find $(distdir) -type f -name "*.pyc" -exec rm -f {} + +# Directories that EXTRA_DIST names whole (lib/d/src, test/erl, ...) also carry what configure, +# the build and rebar3 left in them: configured Makefiles, objects, _build and rebar.lock. + find $(distdir) -type f -name Makefile -exec sh -c 'test -f "$$1.in" && rm -f "$$1"' _ {} \; + rm -f $(distdir)/config.h + find $(distdir) -type f \( -name "*.o" -or -name "*.lo" -or -name "*.a" -or -name "*.la" -or -name "*.obj" \) -exec rm -f {} + + find $(distdir) -type d -name _build -prune -exec rm -rf {} + + find $(distdir) -type f -name rebar.lock -exec rm -f {} + + find $(distdir) -type d -empty -delete rm -f $(distdir)/doc/thrift-threat-model.md print-version: