cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Autobuilds and testcurl.pl on Windows

From: Adam Light <aclight_at_gmail.com>
Date: Wed, 1 Sep 2010 14:40:17 -0700

On Tue, Aug 31, 2010 at 10:20 AM, Adam Light <aclight_at_gmail.com> wrote:
> [I described problems with using testcurl.pl with VC9 as the compiler]
> So I tried doing the following:
>  curl\test\testcurl.pl --target=vc9
>
> This printed:
>  "generate lib/Makefile.vc9"
>  "generate src/Makefile.vc9"
> testcurl: libcurl was not created (libcurl.lib)
>

I have figured out a way to get this to all work, though it required a
patch to Makefile.dist (attached).

The basic problem is that "nmake vc9" only generates the Makefile.vc9
files in /lib and /src, but does not then actually do the build. The
various make configurations for Visual Studio that actually do the
builds (vc, vc_x64, etc) all use the VC variable defined in the
makefile. Its default value is vc6.

It's possible to specify the value of the VC variable in the command line:
  nmake vc9
  nmake vc VC=vc9
However this still requires that nmake be called twice, once to
generate the Makefile.vc9 files, and a second time to actually do the
making.

The attached patch changes the behavior slightly so that now you can use:
  nmake vc VC=vc9
to create the Makefile.vc9 files and then do the making in one
command. Alternately, you can set the VC environment variable and then
use the /E flag with nmake which tells nmake to use the environment
variable values, if they exist, instead of the values defined in the
Makefile.

The patch also adds support for creating Makefile.vc10 makefiles. I've
tested using Visual Studio 2010 Express edition and curl compiles
successfully with the command:
  nmake vc VC=vc10

So with this patch, I'm able to get testcurl.pl running by doing the following:
  set VC=vc9
  set MAKEFLAGS=E
  curl\test\testcurl.pl --target=vc

Adam

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2010-09-01