-- 
dann frazier <[EMAIL PROTECTED]>
--- Begin Message ---
On Mon, 2005-01-17 at 15:05 -0800, [EMAIL PROTECTED]
wrote:
> @@ -488,6 +491,19 @@
>  ifdef MKXFS_BINARY
>       install -m 755 --strip $(MKXFS_BINARY) $(BOEL_BINARIES_DIR)/sbin/
>  endif
> +     #
> +     # 2005-01-12 Andrea Righi
> +     # 
> +     install -m 755 --strip $(LVM_BINARY)                    
> $(BOEL_BINARIES_DIR)/sbin/
> +     #
> +     # Create LVM symlinks to lvm binary
> +     #
> +     @( \
> +             for v in `cat $(SRC_DIR)/$(LVM_DIR)/tools/.commands`; do \
> +                     cd $(BOEL_BINARIES_DIR)/sbin; \
> +                     ln -s -f lvm $$v; \
> +             done; \
> +        )

Thanks Andrea - a few comments...
The cd dir definition is static - why cd there N times when once will
do?  Also, if the cd fails then this command will go right along
creating symlinks in $PWD - the semicolon hides the error from make.  

And why hide the output w/ the @ modifier?  If there's a problem it'd be
good to see what was executing at the time.  And finally, why do it in a
separate subshell (the parens)?

Something like the following looks better to me:
 
cd $(BOEL_BINARIES)/sbin && for ...; do \
  ln -s -f ...;                         \
done

It still hides ln error codes from make - it might even be better to do
something like the following:

$(foreach, binary,$(shell cat $(SRC_DIR)/$(LVM_DIR)/tools/.commands),ln
-sf lvm $(binary) && ) && /bin/true

(examples here aren't tested, just for illustration purposes)


--- End Message ---

Reply via email to