Prevent erroring in gen-modules when no source files are found (needed in some

love-experiments branches)
This commit is contained in:
Bart van Strien
2014-04-25 17:53:38 +02:00
parent 5484921597
commit 853f741ba3
+6 -4
View File
@@ -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 ../..
}