Makefile: test before search for kernel modules
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 20 Aug 2013 11:03:02 +0000 (13:03 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 23 Aug 2013 18:42:40 +0000 (20:42 +0200)
commitfde2605765fd99565ebcde48c5411a69646c2cce
tree986a7334c1324108b44b3ccbcbc055c71ed3abdc
parent467b8d1f694531d77f1c3ce808a424cb8bd0cffe
Makefile: test before search for kernel modules

The 'find $(TARGET_DIR)/lib/modules' used to find and strip kernel
modules fails when no kernel modules have been installed. While the
'|| true' prevents the entire build from failing, there are still some
error messages displayed, which is not nice.

Instead, test if the directory exists before doing the find. We also
remove the '|| true' in order to really abort the build if a
problematic error occurs.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Makefile