Browse Source

Prevent erroring in gen-modules when no source files are found (needed in some
love-experiments branches)

Bart van Strien 11 years ago
parent
commit
853f741ba3
1 changed files with 6 additions and 4 deletions
  1. 6 4
      platform/unix/genmodules

+ 6 - 4
platform/unix/genmodules

@@ -78,11 +78,13 @@ genmodules()
 	for library in *; do
 	for library in *; do
 		NAME="LOVE_LIBRARY_$(upper "$library")"
 		NAME="LOVE_LIBRARY_$(upper "$library")"
 		flags="$flags library-$library"
 		flags="$flags library-$library"
-
-		printf "if $NAME\n"
-		printf "liblove${love_amsuffix}_la_SOURCES += \\\\\n"
 		FILES="$(sourcefind "$library" | sed "s/^/    /")"
 		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
 	done
 	cd ../..
 	cd ../..
 }
 }