Re: Make Problem

Ralf Corsepius <[email protected]>
Newsgroups gmane.linux.suse.programming
Message-ID <[email protected]>
On Sat, 2004-10-09 at 20:56, David Haller wrote:
> Hallo,
> 
> Am Sat, 09 Oct 2004, Ralf Corsepius schrieb:
> >2 Portabilitätsfehler aus deinem Beispiel:
> >
> >1. "for d in $(SUBDIRS)" ist nicht portabel.
> 
> Welche $SHELL kann 'for foo in a b c; do' nicht?

"for foo in a b c" sollten alle Shells beherrschen.

Das Problem ist folgendes:
SUBDIRS=
for d in $(SUBDIRS); do

Dieses expandiert zu
for d in ; do

eine Konstruktion, die von einigen Shells (z.B. die /bin/sh unter
Solaris) nicht beherrscht wird.

D.h. solange sichergestellt ist, dass $(SUBDIRS) nicht leer sein kann,
ist alles in Ordnung, sobald aber $(SUBDIRS) auch leer sein kann, wird
es problematisch.

Ralf



-- 
Um die Liste abzubestellen, schicken Sie eine Mail an:
    [email protected]
Um eine Liste aller verfügbaren Kommandos zu bekommen, schicken
Sie eine Mail an: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.