From: Han Boetes <han@mijncomputer.nl>
To: linux-hotplug@vger.kernel.org
Subject: Re: [klibc] not everybody uses bash
Date: Sun, 10 Apr 2005 10:27:07 +0000 [thread overview]
Message-ID: <20050410102729.GA22814@boetes.org> (raw)
In-Reply-To: <20050408170525.GU15412@boetes.org>
H. Peter Anvin wrote:
> Han Boetes wrote:
> > Though most people do have which installed somewhere.
>
> Denied. which has really bad properties on a lot of shells, and
> unless you can trust "make" to invoke /usr/bin/which (or
> whatever it happens to be), then you're screwed.
>
> The reason the script invokes bash explicitly is to deal with
> people who *aren't* using bash as a shell.
If people don't _have_ bash as a shell it won't work at all.
Every shell I know has ``type foo'' and return something like
``foo is /usr/bin/foo''
--- Makefile.orig 2005-04-10 11:27:49.523924416 +0200
+++ Makefile 2005-04-10 11:53:34.390069064 +0200
@@ -18,12 +18,12 @@
echo 'ARCH=$(ARCH)' >> $@
echo 'CROSS=$(CROSS)' >> $@
echo 'KCROSS=$(KCROSS)' >> $@
- echo "CC=$(shell bash -c 'type -p $(CC)')" >> $@
- echo "LD=$(shell bash -c 'type -p $(LD)')" >> $@
+ echo "CC=$(shell /bin/sh -c 'type $(CC)|sed "s,.* ,,"')" >> $@
+ echo "LD=$(shell /bin/sh -c 'type $(LD)|sed "s,.* ,,"')" >> $@
echo 'REQFLAGS=$(filter-out -I%,$(REQFLAGS))' >> $@
echo 'OPTFLAGS=$(OPTFLAGS)' >> $@
echo 'LDFLAGS=$(LDFLAGS)' >> $@
- echo "STRIP=$(shell bash -c 'type -p $(STRIP)')" >> $@
+ echo "STRIP=$(shell /bin/sh -c 'type $(STRIP)|sed "s,.* ,,"')" >> $@
echo 'STRIPFLAGS=$(STRIPFLAGS)' >> $@
echo 'EMAIN=$(EMAIN)' >> $@
echo 'BITSIZE=$(BITSIZE)' >> $@
@@ -34,7 +34,7 @@
$(CROSS)klcc: klcc.in $(CROSS)klibc.config makeklcc.pl
$(PERL) makeklcc.pl klcc.in $(CROSS)klibc.config \
- $(shell bash -c 'type -p $(PERL)') > $@ || ( rm -f $@ ; exit 1 )
+ $(shell /bin/sh -c 'type $(PERL)|sed "s,.* ,,"') > $@ || ( rm -f $@ ; exit 1 )
chmod a+x $@
%: local-%
# Han
--
(_) Consequences, Schmonsequences, as long as I'm rich. -- Looney
"==' Tunes, Ali Baba Bunny (1957, Chuck Jones)
" "
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2005-04-10 10:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-08 17:05 not everybody uses bash Han Boetes
2005-04-08 20:42 ` Greg KH
2005-04-10 0:20 ` [klibc] " H. Peter Anvin
2005-04-10 10:27 ` Han Boetes [this message]
2005-04-10 17:37 ` H. Peter Anvin
2005-04-10 17:53 ` Han Boetes
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=20050410102729.GA22814@boetes.org \
--to=han@mijncomputer.nl \
--cc=linux-hotplug@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).