Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: From: "Christopher Jones" To: Bernard Dautrevaux , cygwin AT sourceware DOT cygnus DOT com Cc: bug-make AT gnu DOT org Subject: RE: New Cygwin Net Release (make error) Date: Wed, 19 Apr 2000 12:44:59 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01BFAA1E.9A71150A" ------_=_NextPart_001_01BFAA1E.9A71150A Content-Type: text/plain; charset="iso-8859-1" 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 AT gnu DOT org. Brian ------_=_NextPart_001_01BFAA1E.9A71150A Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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=3D$(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=3DUNIX = 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 AT gnu DOT org.  =

Brian

------_=_NextPart_001_01BFAA1E.9A71150A--