[Top][All Lists]
[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: |
Mon, 16 Apr 2007 14:27:25 -0700 (PDT) |
># 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
The reason for this seems to be the following...
On windows, for the $(shell ...) function, stdout for the child process that
executes the shell command line is piped to a stream that is read from the
parent process. After the parent process reads the stream into a buffer, it
doesn't print it to stdout... it just puts the results into the variable buffer.
I think that this is a problem. It can be changed easily by just echoing the
buffered characters to stdout as they are coming in...
if (cc <= 0)
break;
can be changed to...
if (cc <= 0)
break;
else
fwrite(&buffer[i], 1, cc, stdout);
in the function "func_shell"
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
- Re: $(shell ...) and SHELL problems in 3.81, (continued)
- Re: $(shell ...) and SHELL problems in 3.81, Christopher Faylor, 2007/04/15
- Re: $(shell ...) and SHELL problems in 3.81, Eli Zaretskii, 2007/04/15
- Re: $(shell ...) and SHELL problems in 3.81, Christopher Faylor, 2007/04/15
- RE: $(shell ...) and SHELL problems in 3.81, Dave Korn, 2007/04/15
- Re: $(shell ...) and SHELL problems in 3.81, Christopher Faylor, 2007/04/15
- Re: $(shell ...) and SHELL problems in 3.81, Eli Zaretskii, 2007/04/15
Re: $(shell ...) and SHELL problems in 3.81, Aaron Shatters, 2007/04/13
Re: $(shell ...) and SHELL problems in 3.81, Aaron Shatters, 2007/04/16
Re: $(shell ...) and SHELL problems in 3.81,
Aaron Shatters <=
Re: $(shell ...) and SHELL problems in 3.81, Aaron Shatters, 2007/04/16