Current-Users archive

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

Building on Solaris, sh problem: empty for loop

When crosscompiling from Solaris 10 to NetBSD for the netbsd-5 branch (I haven't checked -current), running a "nbmake-i386 install" in src/tests/modules/k_helper gives:

        % ~/cvs/src-5/obj.i386/tooldir/bin/nbmake-i386 install                 #
===> for d in ; do
        -U -M /usr/homes/feyrer/cvs/src-5/obj.i386/destdir/METALOG -D
        /usr/homes/feyrer/cvs/src-5/obj.i386/destdir -h sha1 -N
        /usr/homes/feyrer/cvs/src-5/etc -d $d;  done
===> /usr/xpg4/bin/sh: syntax error at line 1 : `;' unexpected

The error is that the shell can't handle an empty list for the "for" loop.
I've tried to do a "if list not empty" check around it, but the parser still trips over it (of course).

Anyone got a smart idea on how to handle this? Make sh a tool?
Anything less intrusive?

 - Hubert

Home | Main Index | Thread Index | Old Index