]> granicus.if.org Git - zfs/commitdiff
module/Makefile.in: don't run xargs if empty
authorGeorge Melikov <mail@gmelikov.ru>
Tue, 8 Oct 2019 17:10:23 +0000 (20:10 +0300)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 8 Oct 2019 17:10:23 +0000 (10:10 -0700)
If stdin if empty - don't run xargs command,
otherwise we can get `cp: missing file operand`
error.

Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Melikov <mail@gmelikov.ru>
Closes #9418

module/Makefile.in

index 194133864dc7c8af55a1f5deb6dc758194628ad9..24af81aa771a5575671d48bbea3e740b6ca9e6ae 100644 (file)
@@ -115,5 +115,5 @@ distdir:
        list='$(obj-m)'; for objdir in $$list; do \
                (cd @top_srcdir@/module && find $$objdir \
                -name '*.c' -o -name '*.h' -o -name '*.S' | \
-               xargs cp --parents -t @abs_top_builddir@/module/$$distdir); \
+               xargs -r cp --parents -t @abs_top_builddir@/module/$$distdir); \
        done