On Wed, 13 Jun 2007 03:13:48 +0200
Roland Mainz <[EMAIL PROTECTED]> wrote:
[...]
> Erm, I simply missed the " $(ELFEXTRACT) $(DBOOT_BIN)"-line... sorry...
> ...the code should look like this:
> -- snip --
> @ ( echo " .data" ; \
> echo " .globl dboot_image" ; \
> echo "dboot_image:" : \
> $(ELFEXTRACT) $(DBOOT_BIN) ; \
> ) > "$(DBOOT_S)"
> $(ELFEXTRACT) $(DBOOT_BIN)
> -- snip --
I must admit I like how this code looks.
> from the viewpoint of performace this currently doesn't save much (e.g.
> you save lots of |open()|+|close()| calls) ... but if you use ksh you
> can replace the "echo" statements with "print" (which is like "echo"
> except that it is a ksh builtin command and therefore saves the
> |fork()|+|exec()|) and use a block (e.g. "{ ... ; }" instead of a
> subshell (e.g. "( ... )") which saves another |fork()|.
[...]
The shell is a workhorse. I can't see going back and rototilling a
bunch of scripts for micro optimization. Put out a good style guide
and hold future changes to high standards. That makes more sense to me.
mph
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code