test/make/configure.vm

changeset 13
cdf8bf4549c4
parent 12
a775e493d340
child 14
87fea7ab27de
equal deleted inserted replaced
12:a775e493d340 13:cdf8bf4549c4
315 ENV_LDFLAGS=$LDFLAGS 315 ENV_LDFLAGS=$LDFLAGS
316 ENV_CXXFLAGS=$CXXFLAGS 316 ENV_CXXFLAGS=$CXXFLAGS
317 317
318 # Toolchain detection 318 # Toolchain detection
319 # this will insert make vars to config.mk 319 # this will insert make vars to config.mk
320 source make/toolchain.sh 320 . make/toolchain.sh
321 321
322 # add user specified flags to config.mk 322 # add user specified flags to config.mk
323 echo >> $TEMP_DIR/config.mk 323 echo >> $TEMP_DIR/config.mk
324 if [ ! -z "${ENV_CFLAGS}" ]; then 324 if [ ! -z "${ENV_CFLAGS}" ]; then
325 echo "CFLAGS += $ENV_CFLAGS" >> $TEMP_DIR/config.mk 325 echo "CFLAGS += $ENV_CFLAGS" >> $TEMP_DIR/config.mk
368 #end 368 #end
369 #foreach( $flags in $sub.flags ) 369 #foreach( $flags in $sub.flags )
370 #if( $flags.exec ) 370 #if( $flags.exec )
371 $flags.value > /dev/null 371 $flags.value > /dev/null
372 if [ $? -eq 0 ]; then 372 if [ $? -eq 0 ]; then
373 $flags.varName="$flags.varName `$flags.value`" 373 $flags.varName="$$flags.varName `$flags.value`"
374 else 374 else
375 break 375 break
376 fi 376 fi
377 #else 377 #else
378 $flags.varName="$flags.varName $flags.value" 378 $flags.varName="$$flags.varName $flags.value"
379 #end 379 #end
380 #end 380 #end
381 #foreach( $test in $sub.tests ) 381 #foreach( $test in $sub.tests )
382 $test > /dev/null 382 $test > /dev/null
383 if [ $? -ne 0 ]; then 383 if [ $? -ne 0 ]; then
442 442
443 #foreach( $flags in $dependency.flags ) 443 #foreach( $flags in $dependency.flags )
444 #if( $flags.exec ) 444 #if( $flags.exec )
445 $flags.value > /dev/null 445 $flags.value > /dev/null
446 if [ $? -ne 0 ]; then 446 if [ $? -ne 0 ]; then
447 $flags.varName="$flags.varName `$flags.value`" 447 $flags.varName="$$flags.varName `$flags.value`"
448 else 448 else
449 ERROR=1 449 ERROR=1
450 break 450 break
451 fi 451 fi
452 #else 452 #else
453 $flags.varName="$flags.varName $flags.value" 453 $flags.varName="$$flags.varName $flags.value"
454 #end 454 #end
455 #end 455 #end
456 #if ( $dependency.make.length() > 0 ) 456 #if ( $dependency.make.length() > 0 )
457 cat >> $TEMP_DIR/make.mk << __EOF__ 457 cat >> $TEMP_DIR/make.mk << __EOF__
458 $dependency.make 458 $dependency.make

mercurial