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
This commit is contained in:
Daniel Stenberg 2025-07-29 23:14:41 +02:00
parent 58e0ff809f
commit 7ed349de4c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 5 additions and 2 deletions

View file

@ -162,7 +162,7 @@ CHECKSOURCES = checksrc
endif
endif
all-local: $(CHECKSOURCES) $(UNITPROTOS)
all-local: $(CHECKSOURCES)
UNIT_V = $(UNITV_$(V))
UNITV_0 = @echo " UNITPR " $@;

View file

@ -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