help-make
[Top][All Lists]
Advanced

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

RE: desperate situation with $(shell ... :(


From: John Dill
Subject: RE: desperate situation with $(shell ... :(
Date: Sun, 27 Feb 2011 01:28:22 -0500

>-----Original Message-----
>From: Mark Galeck (CW) [mailto:address@hidden
>Subject: RE: desperate situation with $(shell ... :(
 
>>fwrite=$(shell ($(__mxl_echo) "$2") >> $1) else
>(...)
>>There was a reason why I needed the extra parentheses to run the echo
>>command in a subshell, but it's been so long
>
>Well, the parentheses are not recognized as a special syntax in that
>context by GNU make, so they are passed to the shell, and the reason why
>they would be needed, is if the shell needed them to not echo ">>" - and
>Windows shell documentation says, they are not needed.  Tell me if you
>remember some other reason... Thank you.  

Search for 'caveat of using >> and 2>nul' in alt.msdos.batch.nt.  Should be a 
thread around Jan 2006.  When I created the 'Batch Library In Progress' library 
on Sourceforge a while back, using parentheses to create a subshell was often 
necessary to get many of my batch scripts to work correctly.  I'm not positive 
that the thread answers your question precisely, but it's the best I could find 
being out of it for a few years.  Batch scripting with cmd.exe is quirky to 
work with, and much of my experience was based more on people's collective 
experimentation than Microsoft's documentation.

>By the way, I want to say, I appreciate everybody's help here.  My
>intention was, just to check if I don't understand something about how
>"make" works.  It appears that is not the case, unfortunately :)  that
>would be an easy fix.  Then, it's my job to find some fix and I will do
>it, I don't mean to ask you to do my job :)

I think it's in the general populace's best interest to share the help and 
experience that they have.  And to be sure, I haven't done your job, as I don't 
know if my cmd script tweak actually solves your problem ;-)

Best regards,
John Dill


reply via email to

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