[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: $(shell) strips CRLF
From: |
Paul D. Smith |
Subject: |
RE: $(shell) strips CRLF |
Date: |
Fri, 26 Apr 2002 12:14:55 -0400 |
%% "Bryan Miller" <address@hidden> writes:
bm> I have read the documentation and noted the entry regarding s/\n/
bm> /g. The GNU Make manual is the most dogeared reference on my desk
bm> outside of Johan's Perl Pocket Reference. I guess my question
bm> could have been more carefully worded. Is there a similar way to
bm> grab something from an OS call and not strip the new line
bm> characters? Paul says "no" so I will look for a solution outside
bm> of make.
I think I'm not making myself clear :).
It doesn't matter whether there's a way to grab something from the OS
and put it into a make variable without stripping the newlines.
Why not?
Because even if you _have_ a variable with contents that contains
newlines, you can't _USE_ it for anything. You can prove that to
yourself by making an internal variable with newlines using define, and
then trying to use it:
define CONFIG_SPEC
element * CHECKEDOUT
element * /main/LATEST
enddef
Now this variable $(CONFIG_SPEC) contains a real newline character.
So, that's why we're asking what you're trying to use the value for;
that is where you have to redesign your approach, not where you try to
read the value in.
Have fun!
-----
[1] Actually, I can think of _one_ legal thing you could do with it, but
it's not what you want to do :).
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- $(shell) strips CRLF, Bryan Miller, 2002/04/25
- Re: $(shell) strips CRLF, Eli Zaretskii, 2002/04/26
- RE: $(shell) strips CRLF, Bryan Miller, 2002/04/26
- RE: $(shell) strips CRLF,
Paul D. Smith <=
- RE: $(shell) strips CRLF, Bryan Miller, 2002/04/26
- RE: $(shell) strips CRLF, Paul D. Smith, 2002/04/26
- RE: $(shell) strips CRLF, Bryan Miller, 2002/04/26
- RE: $(shell) strips CRLF, Paul D. Smith, 2002/04/26
- RE: Exiting make upon error..., Bryan Miller, 2002/04/27
- Re: $(shell) strips CRLF, Eli Zaretskii, 2002/04/28