Re: [PATCH] add XARGS to toplevel Makefile

From: Willy Tarreau
Date: Sat Sep 30 2006 - 04:35:25 EST

Hi Olaf,

On Sat, Sep 30, 2006 at 09:54:27AM +0200, Olaf Hering wrote:
> run xargs with --no-run-if-empty to avoid random failures:
> MAKE tags
> ctags: No files specified. Try "ctags --help".
> make: *** [tags] Error 123

> +# assume xargs comes from GNU findutils or GNU coreutils
> +XARGS = $(shell if [ "$$(uname -s)" = "Linux" ]; then echo "xargs --no-run-if-empty" ; else echo "xargs" ; fi )

I'd rather test xargs' support for the option than check the OS with uname.
Something like the following might a little bit be more appropriate :

XARGS = $(shell if xargs --no-run-if-empty true </dev/null 2>/dev/null; then echo "xargs --no-run-if-empty" ; else echo "xargs" ; fi )

Best regards,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at