mbox series

[0/2] use `curl-config --cflags`

Message ID 20200326080540.GA2200522@coredump.intra.peff.net (mailing list archive)
Headers show
Series use `curl-config --cflags` | expand

Message

Jeff King March 26, 2020, 8:05 a.m. UTC
I was recently testing Git's behavior with respect to various versions
of libcurl. So I built a one-off libcurl and installed it in /tmp/foo,
but was surprised that:

  make CURL_CONFIG=/tmp/foo/bin/curl-config

didn't work, since we do run "$(CURL_CONFIG) --libs". This fixes it,
along with a minor optimization to the existing "--libs" call.

  [1/2]: Makefile: avoid running curl-config multiple times
  [2/2]: Makefile: use curl-config --cflags

 Makefile | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

-Peff

Comments

Junio C Hamano March 27, 2020, 10:12 p.m. UTC | #1
Jeff King <peff@peff.net> writes:

> I was recently testing Git's behavior with respect to various versions
> of libcurl. So I built a one-off libcurl and installed it in /tmp/foo,
> but was surprised that:
>
>   make CURL_CONFIG=/tmp/foo/bin/curl-config
>
> didn't work, since we do run "$(CURL_CONFIG) --libs". This fixes it,
> along with a minor optimization to the existing "--libs" call.
>
>   [1/2]: Makefile: avoid running curl-config multiple times
>   [2/2]: Makefile: use curl-config --cflags
>
>  Makefile | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
>
> -Peff

Both patches made sense.  Thanks.
Johannes Schindelin April 4, 2020, 1:38 p.m. UTC | #2
Hi Peff,

On Thu, 26 Mar 2020, Jeff King wrote:

> I was recently testing Git's behavior with respect to various versions
> of libcurl. So I built a one-off libcurl and installed it in /tmp/foo,
> but was surprised that:
>
>   make CURL_CONFIG=/tmp/foo/bin/curl-config
>
> didn't work, since we do run "$(CURL_CONFIG) --libs". This fixes it,
> along with a minor optimization to the existing "--libs" call.
>
>   [1/2]: Makefile: avoid running curl-config multiple times
>   [2/2]: Makefile: use curl-config --cflags

I _suspect_ that this is responsible for the build failure

	make: curl-config: Command not found

at https://github.com/git/git/runs/556459415#step:4:674

Do we need this to fix this?

-- snip --
diff --git a/ci/test-documentation.sh b/ci/test-documentation.sh
index de41888430a..325b4cc6185 100755
--- a/ci/test-documentation.sh
+++ b/ci/test-documentation.sh
@@ -11,6 +11,7 @@ filter_log () {
 	    -e '/^    \* new asciidoc flags$/d' \
 	    -e '/stripped namespace before processing/d' \
 	    -e '/Attributed.*IDs for element/d' \
+	    -e '/curl-config: Command not found/d' \
 	    "$1"
 }

-- snap --

Ciao,
Dscho

>
>  Makefile | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
>
> -Peff
>