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
More information about the Cygwin
mailing list