make-w32
[Top][All Lists]
Advanced

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

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


From: Aaron Shatters
Subject: Re: $(shell ...) and SHELL problems in 3.81
Date: Fri, 13 Apr 2007 12:55:02 -0700 (PDT)

After reading a few hours worth of posts on the cygwin mailing list, it seems 
like it is not even worth attempting to get to the bottom of the windows 
cmd.exe shell problems that I am having with the Cygwin binaries.  I am still 
very confused why the same source code built with MinGW gcc or Cygwin gcc acts 
so differently.  Am I correct in assuming that they are built with the same 
source, just different version of gcc and libraries?

>> 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.

Ok, now I have built the MinGW make binary myself, with 3.81 (direct from 
http://ftp.gnu.org/pub/gnu/make/make-3.81.tar.gz), 3.81-1, and 3.81-2, and I am 
still not getting the result that I expect.  I am running from the windows 
command prompt, completely unrelated and outside of Cygwin.  Following is the 
complete makefile I am using to do the quick test:

# makefile
VARA := $(shell echo someText)
VARB := $(shell echo $(VARA)1)
all:
    @echo $(VARA)2
    @echo $(VARB)3
# end

This prints:
someText2
someText13

I expect it to print:
someText
someText1
someText2
someText13

There are two reasons why I don't just use $(info ...).
1 - We have clearmake makefiles that we would like to make compatible with gnu 
make.  clearmake has a gnu compatibility mode that we have been using, so this 
shouldn't be an issue at all, except that it is an issue because clearmake 
prints what I expect in this case, and gnu make doesn't.
2 - I am very confused and curious as to why it works for Eli and not me.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

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