From 853f741ba3ca97631ccf3d1e2a8a741e4dac36c0 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Fri, 25 Apr 2014 17:53:38 +0200 Subject: [PATCH] Prevent erroring in gen-modules when no source files are found (needed in some love-experiments branches) --- platform/unix/genmodules | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/platform/unix/genmodules b/platform/unix/genmodules index 1b1ed65e7..5c4107d1a 100644 --- a/platform/unix/genmodules +++ b/platform/unix/genmodules @@ -78,11 +78,13 @@ genmodules() for library in *; do NAME="LOVE_LIBRARY_$(upper "$library")" flags="$flags library-$library" - - printf "if $NAME\n" - printf "liblove${love_amsuffix}_la_SOURCES += \\\\\n" FILES="$(sourcefind "$library" | sed "s/^/ /")" - printf "${FILES:0:${#FILES}-2}\nendif\n\n" + + if [[ ${#FILES} -gt 2 ]]; then + printf "if $NAME\n" + printf "liblove${love_amsuffix}_la_SOURCES += \\\\\n" + printf "${FILES:0:${#FILES}-2}\nendif\n\n" + fi done cd ../.. }