help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make file version problem


From: Todd Showalter
Subject: Re: make file version problem
Date: Thu, 25 Mar 2010 08:42:24 -0400

On Thu, Mar 25, 2010 at 1:51 AM, Pritam Nandy <address@hidden> wrote:

> sorry having forgot to mention that I'm workin in a windows environment and
> you're right when mentioning that variable expands to something like
> %DIR%/file.c. and what's this IIRC make? I'm usin the make from cygwin by
> the way. does that mean if I'm usin a % in my prerequisite list I should be
> usin it in the target as well? but then, I don't see the same error poppin
> up when I use make v3.60!!

    IIRC is shorthand for "If I Recall Correctly".  I was actually
saying "If I recall correctly, make's (and cygwin's) handling of
windows environment variables has changed from version to version".
With the implied "and largely improved".

    I would suggest (if possible) using a non-ancient version of make
and cygwin, if you can.  I don't know how that variable is being
introduced, but chances are it's a bug in that version of make that
has been fixed subsequently.

    If you can't use current versions, then you're going to have to
figure out how the windows environment variable is getting into your
makefile and do something about it. At the worst, you can write a
simple command line program to do windows env var expansion, and then
do something like:

FIXED_LIBLIST=$(shell expand_win_vars $(LIBLIST))

    Where expand_win_vars is a command line program that looks something like:

-----8<-----
#include <stdio.h>

int main(int argc, char **argv)
{
  for(int t = 1; t < argc; t++)
    {
        // expand any windows env vars in argv[t]
        // print argv[t] followed by a single space
    }

  printf("\n");
  return 0;
}
----->8-----

    The simplest answer, though really is to use the latest versions
of cygwin and make, unless there's some compelling reason not to.

                                                                       Todd.

-- 
 Todd Showalter, President,
 Electron Jump Games, Inc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]