]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
autotools: fix `--with-ca-embed` build rule
authorViktor Szakats <commit@vsz.me>
Thu, 12 Sep 2024 13:08:05 +0000 (15:08 +0200)
committerViktor Szakats <commit@vsz.me>
Thu, 12 Sep 2024 17:58:14 +0000 (19:58 +0200)
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

acinclude.m4
src/Makefile.am

index 056a9794105b8d3860fbe6ff7536e84fcbac77f9..d0f492bd4964f37f7b917ff3d2dbe9d2757aa603 100644 (file)
@@ -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
index c1c223b269dfa301e9450bdcf23e62b7e81455a6..ebfb98c15b51bbf47f9e7c20393d5d6d1b5e8f32 100644 (file)
@@ -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)