[Top][All Lists]

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

Re: $(shell ...) and SHELL problems in 3.81

From: Eli Zaretskii
Subject: Re: $(shell ...) and SHELL problems in 3.81
Date: Fri, 13 Apr 2007 12:08:08 +0300

> Date: Thu, 12 Apr 2007 13:24:56 -0700 (PDT)
> From: Aaron Shatters <address@hidden>
> export SHELL := c:/WINDOWS/system32/cmd.exe
> _INFO := $(info $(shell echo Does this work))
> .PHONY: all
> all:
>     @echo hello
> ##
> With 3.81 built for/with cygwin, it hangs and doesn't do anything at all.  I 
> thought that it might have been because of the ':' after the drive letter, so 
> I tried updating to the patched 3.81 at 
>  This version also hangs up 
> indefinitely.  The reason seems to be because of the $(shell ...) function.  
> When I remove the $(shell ...) function line, the executing the makefile just 
> launches a new cmd.exe shell (with banner and all).  This is also unexpected.

Sounds like the Cygwin Make doesn't like cmd.exe being the shell, but
that's a guess.

Can you debug this on your machine, and show us where it loops and
why?  (Please use only the patched v3.81 Cygwin Make, since the
original one is not supposed to support drive letters in file names.)
If you do show where you see it looping, I can think about the problem
and suggest a patch for you to try.

If you cannot debug this yourself, I suggest to take this up with the
Cygwin folks on the Cygwin mailing list.  I don't use Cygwin myself,
so I cannot debug this problem.

> Now, I decided to try one more thing.  Running this makefile with 
> mingw32-make-3.81-1.  This results in yet another variation.  The process 
> completes and prints "hello", but the $(shell ...) function is not working as 
> I expect it to.
> _INFO := $(info $(shell echo Does this work))
> Results in printing "Does this work", and _INFO is empty, but,
> _INFO := $(shell echo Does this work)
> Results in printing nothing, and _INFO contains "Does this work"

I cannot reproduce this with the MinGW-compiled binary of Make 3.81:
the last result is that "Does this work" is printed and _INFO contains
"Does this work", as I would expect.

The differences between my setup and yours are:

 . I built my MinGW binary myself, instead of downloading from the
   MinGW site
 . I don't have the Cygwin Bash installed

Not sure whether any of these has any effect on the problem, though.

> So, this leads me to a few questions:
> 1 - why doesn't the $(shell ...) function work with 3.81 for/with cygwin
> 2 - why doesn't @echo hello work with 3.81 for/with cygwin

These are questions for the Cygwin mailing list.

> 3 - why doesn't _INFO := $(shell echo Does this work) print to stdout with 
> any version

Works for me with the native Windows build.

reply via email to

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