All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Roland Kuhn <rkuhn@e18.physik.tu-muenchen.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: cross-compiling on OS X, make menuconfig fails
Date: Tue, 29 Apr 2008 09:51:51 -0500	[thread overview]
Message-ID: <48173607.6080307@freescale.com> (raw)
In-Reply-To: <8FEAC32C-868F-468C-B383-8450D400691C@e18.physik.tu-muenchen.de>

Roland Kuhn wrote:

> For some strange reason Apple decided to change 'echo':
> 
> /bin/bash -c 'echo -e ...' does the right thing
> /bin/sh -c 'echo -e ...' keeps the "-e" in the output but interprets  
> the \n
> /bin/echo -e ... does no interpretation and even keeps the \n

Wow, that is messed up.  Especially since "/bin/sh --version" and "/bin/bash
--version" give me the same output.

Would you say that OS X is broken?  I'm having a hard time finding documentation
for 'sh', so I can't find out what echo -e  is supposed to do in 'sh'.

I read in the latest Linux Journal magazine that someone noticed that even
though the kernel scripts say #!/bin/sh, many of them are really bash scripts.
This person went through the effort of changing the script to be true 'sh'
scripts.  Has that code been merged in?

> I'd recommend installing the coreutils-default package from fink, then  
> you get a sane /sw/bin/echo.

But the scripts still reference /bin/sh, so I would need to change the scripts
or symlink /bin/sh.  If I'm going to symlink /bin/sh, I'd rather just symlink it
to /bin/bash.

> Side-note on sanity: ISTR that POSIX defines echo in this (/bin/echo)  
> strange way, urging people to use printf instead.

But printf is bash, not sh.  I would need to change #!/bin/sh to #!/bin/bash.

-- 
Timur Tabi
Linux kernel developer at Freescale

  reply	other threads:[~2008-04-29 14:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-28  1:34 cross-compiling on OS X, make menuconfig fails timur
2008-04-28  1:51 ` Tony Breeds
2008-04-29 15:07   ` Timur Tabi
2008-04-29 16:45     ` Sam Ravnborg
2008-04-29 17:20       ` Al Viro
2008-04-29 18:06         ` Sam Ravnborg
2008-04-30 13:54           ` Timur Tabi
2008-04-30 14:18             ` Sam Ravnborg
2008-05-03  6:55           ` SL Baur
2008-05-03  8:01             ` Sam Ravnborg
2008-05-03  8:40             ` Roland Kuhn
2008-05-03  9:34               ` SL Baur
2008-05-12 13:22                 ` Arnd Hannemann
2008-04-28 18:46 ` Roland Kuhn
2008-04-29 14:51   ` Timur Tabi [this message]
2008-04-29 16:45     ` Sam Ravnborg
2008-04-29 16:48       ` Al Viro
2008-04-29 20:27       ` Why use /bin/sh in kernel build system? Mark Rustad
2008-04-29 21:41         ` Alexey Dobriyan
2008-04-29 22:24           ` Willy Tarreau
2008-04-29 22:40             ` Timur Tabi
2008-04-30  9:42             ` SL Baur
2008-04-30 11:48             ` Jan Engelhardt
2008-04-29 22:46     ` cross-compiling on OS X, make menuconfig fails Bernd Petrovitsch
  -- strict thread matches above, loose matches on Subject: below --
2008-04-28  1:34 Timur Tabi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48173607.6080307@freescale.com \
    --to=timur@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkuhn@e18.physik.tu-muenchen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.