]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
unit-tests: build the unitprotos.h from here
authorDaniel Stenberg <daniel@haxx.se>
Tue, 29 Jul 2025 21:14:41 +0000 (23:14 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 30 Jul 2025 07:06:35 +0000 (09:06 +0200)
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
tests/unit/Makefile.am

index 32dbb0754ee9af2190bef2262c92fff8822aa905..f6ea5807d5ec6542003fb9e22808f9b09ffefba0 100644 (file)
@@ -162,7 +162,7 @@ CHECKSOURCES = checksrc
 endif
 endif
 
-all-local: $(CHECKSOURCES) $(UNITPROTOS)
+all-local: $(CHECKSOURCES)
 
 UNIT_V = $(UNITV_$(V))
 UNITV_0 = @echo "  UNITPR  " $@;
index a83809595fa33c93131c8a87e5ad7439872d6cbc..32c2f3895594b495fa0c2b8f37eccdf56c6f5f03 100644 (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