From 7ed349de4cd579c3f3c268f738d1446f1f50b1ec Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 29 Jul 2025 23:14:41 +0200 Subject: [PATCH] unit-tests: build the unitprotos.h from here Make the bundle depend on the header in the lib dir and built it now if not present. Reported-by: Todd Gamblin Fixes #18088 Closes #18089 --- lib/Makefile.am | 2 +- tests/unit/Makefile.am | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 32dbb0754e..f6ea5807d5 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -162,7 +162,7 @@ CHECKSOURCES = checksrc endif endif -all-local: $(CHECKSOURCES) $(UNITPROTOS) +all-local: $(CHECKSOURCES) UNIT_V = $(UNITV_$(V)) UNITV_0 = @echo " UNITPR " $@; diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index a83809595f..32c2f38955 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -60,9 +60,12 @@ endif AM_CPPFLAGS += -DBUILDING_LIBCURL if BUILD_UNITTESTS -$(BUNDLE).c: $(top_srcdir)/scripts/mk-unity.pl Makefile.inc $(FIRST_C) $(TESTS_C) +$(BUNDLE).c: $(top_srcdir)/scripts/mk-unity.pl Makefile.inc $(FIRST_C) $(TESTS_C) $(top_builddir)/lib/unitprotos.h @PERL@ $(top_srcdir)/scripts/mk-unity.pl --test $(TESTS_C) > $(BUNDLE).c +$(top_builddir)/lib/unitprotos.h: + (cd $(top_builddir)/lib && $(MAKE) unitprotos.h) + noinst_PROGRAMS = $(BUNDLE) LDADD = $(top_builddir)/lib/libcurlu.la CLEANFILES = $(BUNDLE).c -- 2.47.2