@@ -3,16 +3,16 @@ set -x
# Auto generate the platform list
PLATFORM_M4S=$(ls platform/*/m4/configure.m4)
-PLATFORMS=$(basename -a ${PLATFORM_M4S//\/m4\/configure\.m4/})
GEN_M4="m4/platforms.m4"
prefix=""
echo "# Auto-Generated platform list" > $GEN_M4
-for platform in $PLATFORMS; do
+for platform_m4 in $PLATFORM_M4S; do
+ platform=$(echo ${platform_m4}|awk -F'/' '{print $2}')
cat << EOF >> $GEN_M4
${prefix}if test "\${with_platform}" == "${platform}";
then
- m4_include([./platform/${platform}/m4/configure.m4])
+ m4_include([./${platform_m4}])
EOF
prefix="el"
done