cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: ca-bundle.crt and `make install prefix=...`

From: Roth, Kevin P. <KPRoth_at_MarathonOil.com>
Date: Mon, 7 Oct 2002 10:35:45 -0400

1 - the lib/Makefile.am change works fine for me too. Thanks.

2 - I use different prefixes because it makes the most sense (to me)
  this way. My package will get installed into "/usr" by the cygwin
  installer; however I can't install there at build time, because
  I'd have no (convenient) way of getting all the files into a tarball.
  
  However, I was unaware of the DESTDIR option, which makes more sense
  than changing the prefix variable. So, here's a small patch for
  packages/Win32/cygwin/Makefile.am:

--- Makefile.am 2002-10-07 10:29:14.000000000 -0400
+++ Makefile.am.new 2002-10-07 10:28:52.000000000 -0400
@@ -22,3 +22,3 @@
        rm -rf $(cygwintmp)-dev
- $(MAKE) -C $(top_builddir) install-strip prefix=$(cygwintmp)/usr
+ $(MAKE) -C $(top_builddir) DESTDIR=$(cygwintmp) install-strip
        # $(STRIP) $(cygwintmp)/usr/bin/cygcurl-?.dll

3 - Changing ca-bundle.h at build time to point to the new prefix (at
  least for MY use of the prefix variable) would be the wrong behavior,
  since the final resting place for ca-bundle.crt will still be the
  prefix specified at configure time. I will just use the DESTDIR
  variable instead.

Thanks for the info,
--Kevin

-----Original Message-----
From: Daniel Stenberg [mailto:daniel_at_haxx.se]
Sent: Monday, October 07, 2002 5:25 AM

> The problem is in the install part - it's looking for the file
> 'lib/ca-bundle.crt', which is not found, because it's actually at
> '../lib/ca-bundle.crt'.

Ah, right. This was due to me being stupid, but I made a fix and I tried to
do something like you did above and it seemed to work after this fix:

> 2. When building my cygwin binary packages, I do a `make install
> prefix=BLAH`, where BLAH is a temporary directory located at
> $(buildtop)/packages/Win32/cygwin/tmp_cygbuild. Note that I'm specifying a
> non-standard install prefix at MAKE time rather than at CONFIGURE time...

Is this really the "official" way of doing things like this? I mean, why do
you use different prefixes at configure and on make time?

If you want to install curl with a prefix=/usr but at a different path,
DESTDIR is the variable to set:

> I could just specify my temp prefix at configure time, but since this used
> to work as I'm describing, could it be made to work again at some point?

I guess it can. However, that would require us to generate a new
lib/ca-bundle.h on make install, as that needs a full path name to the
installed bundle file.

I think that the solution to this problem is to do just what I said above,
make the 'make install' target change the lib/ca-bundle.h file to get the
correct full path.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-07