From: Viktor Szakats Date: Thu, 12 Sep 2024 13:08:05 +0000 (+0200) Subject: autotools: fix `--with-ca-embed` build rule X-Git-Tag: curl-8_10_1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28fa417bf0718fb119ab4b09d914e3b46b3c7a18;p=thirdparty%2Fcurl.git autotools: fix `--with-ca-embed` build rule Add missing rule dependency on the user-specified CA bundle. This fixes including it when using the curl distro tarball, and other cases. Also: - fix the internal name of the CA bundle to avoid nested quotes. It broke broke the rule dependency for the make tool. - exclude the generated (empty) `tool_ca_embed.c` file from the distro tarball. Patch-by: Daniel Stenberg Follow-up to 8a3740bc8e558b9a9d4a652b74cf27a0961d7010 #14059 Reported-by: rampageX on github Fixes #14879 Closes #14882 --- diff --git a/acinclude.m4 b/acinclude.m4 index 056a979410..d0f492bd49 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1360,7 +1360,7 @@ AS_HELP_STRING([--without-ca-embed], [Don't embed a default CA bundle]), CURL_CA_EMBED='' if test "x$want_ca_embed" != "xno" -a "x$want_ca_embed" != "xunset" -a -f "$want_ca_embed"; then - CURL_CA_EMBED='"'$want_ca_embed'"' + CURL_CA_EMBED="$want_ca_embed" AC_SUBST(CURL_CA_EMBED) AC_MSG_RESULT([$want_ca_embed]) else diff --git a/src/Makefile.am b/src/Makefile.am index c1c223b269..ebfb98c15b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -140,7 +140,7 @@ CLEANFILES += $(CA_EMBED_CSOURCE) if CURL_CA_EMBED_SET AM_CPPFLAGS += -DCURL_CA_EMBED MK_FILE_EMBED = $(top_srcdir)/src/mk-file-embed.pl -$(CA_EMBED_CSOURCE): $(MK_FILE_EMBED) +$(CA_EMBED_CSOURCE): $(MK_FILE_EMBED) $(CURL_CA_EMBED) $(PERL) $(MK_FILE_EMBED) --var curl_ca_embed < $(CURL_CA_EMBED) > $(CA_EMBED_CSOURCE) else $(CA_EMBED_CSOURCE): @@ -174,3 +174,6 @@ if HAVE_WINDRES .rc.o: $(RC) -I$(top_srcdir)/include -DCURL_EMBED_MANIFEST $(RCFLAGS) -i $< -o $@ endif + +dist-hook: + rm -f $(distdir)/$(CA_EMBED_CSOURCE)