# New Cygwin Net Release (make error)

Christopher Jones cbjones@nortelnetworks.com
Wed Apr 19 09:47:00 GMT 2000

Title: RE: New Cygwin Net Release (make error)

>From Bernard
> From Brian
>> Okay, I'm sure of what caused this now.Ã‚Â  The Makefile look
>> something like
>> this.
>>
>> #--begin Makefile---
>> SOMEVAR=$(ANOTHERVAR)/etc >> include$(DEVDIR)/Makefile.mstr
>> #--end Makefile---
>>
>> DEVDIR is defined in the environment.Ã‚Â  ANOTHERVAR however is
>> defined in the
>> included makefile.Ã‚Â  I thought make was supposed to try to do
>> full expansion
>> on a second read of the makefile?Ã‚Â  Seems to have worked before.Ã‚Â
>
> In fact make is suppose to expand SOMEVAR only when it sees
> \$(SOMEVAR), so
> yo u only have to be sure that ANOTHERVAR is set before trying to use
> SOMEVAR. However be careful: if SOMEVAR is used in a
> dependency (either
> target or dependant part), it will be expanded as soon as it is seen.

So I went off and tried to duplicate my problem with the smallest Makefile possible and have succeeded.Ã‚Â  Turns out the problem is with a target macro's value indicating a dos style filename, e.g. e:/dir/file (yes, with UNIX slashes) even with MAKE_MODE=UNIX set in the environment.Ã‚Â  Using something like //e/dir/file works of course.Ã‚Â  I think that on win32 e:/dir/file is supposed to be allowed without confusing the make parser but I cannot find much in the info documentation to help make this clearer (it did work in the past with make 3.75, the cygwin 1.1 net release uses 3.77).

>From make.info 3.77...

Ã‚Â Ã‚Â  Microsoft operating systems (MS-DOS and MS-Windows) use backslashes
to separate directories in pathnames, like so:

Ã‚Â Ã‚Â Ã‚Â Ã‚Â Ã‚Â Ã‚Â  c:\foo\bar\baz.c

Ã‚Â Ã‚Â  This is equivalent to the Unix-style c:/foo/bar/baz.c' (the c:'
part is the so-called drive letter).Ã‚Â  When make' runs on these
systems, it supports backslashes as well as the Unix-style forward
slashes in pathnames.Ã‚Â  However, this support does *not* include the
wildcard expansion, where backslash is a quote character.Ã‚Â  Therefore,
you *must* use Unix-style slashes in these cases.

--- end excerpt from info

Ideas?Ã‚Â  I've cc'd bug-make@gnu.org.Ã‚Â

Brian

`