make/configure.vm

changeset 796
fec90b848f4b
parent 753
24dc84788dee
child 815
b0c4750cecd8
equal deleted inserted replaced
795:00ba1bfa4ab4 796:fec90b848f4b
284 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then : 284 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then :
285 else return 1 ; fi 285 else return 1 ; fi
286 return 0 286 return 0
287 } 287 }
288 288
289 print_check_msg()
290 {
291 if [ -z "$1" ]; then
292 shift
293 printf "$@"
294 fi
295 }
296
289 #foreach( $dependency in $namedDependencies ) 297 #foreach( $dependency in $namedDependencies )
290 dependency_error_${dependency.id}() 298 dependency_error_${dependency.id}()
291 { 299 {
292 printf "checking for ${dependency.name}... " 300 print_check_msg "${D}dep_checked_${dependency.id}" "checking for ${dependency.name}... "
293 #foreach( $sub in $dependency.subdependencies ) 301 #foreach( $sub in $dependency.subdependencies )
294 # dependency $sub.fullName 302 # dependency $sub.fullName
295 while true 303 while true
296 do 304 do
297 #if( $sub.platform ) 305 #if( $sub.platform )
344 cat >> $TEMP_DIR/make.mk << __EOF__ 352 cat >> $TEMP_DIR/make.mk << __EOF__
345 # Dependency: $dependency.name 353 # Dependency: $dependency.name
346 $sub.make 354 $sub.make
347 __EOF__ 355 __EOF__
348 #end 356 #end
349 echo yes 357 print_check_msg "${D}dep_checked_${dependency.id}" "yes\n"
358 dep_checked_${dependency.id}=1
350 return 1 359 return 1
351 done 360 done
352 361
353 #end 362 #end
354 echo no 363 print_check_msg "${D}dep_checked_${dependency.id}" "no\n"
364 dep_checked_${dependency.id}=1
355 return 0 365 return 0
356 } 366 }
357 #end 367 #end
358
359
360
361 368
362 # start collecting dependency information 369 # start collecting dependency information
363 echo > "$TEMP_DIR/flags.mk" 370 echo > "$TEMP_DIR/flags.mk"
364 371
365 DEPENDENCIES_FAILED= 372 DEPENDENCIES_FAILED=
395 ERROR=1 402 ERROR=1
396 break 403 break
397 fi 404 fi
398 #end 405 #end
399 #foreach( $pkg in $dependency.pkgconfig ) 406 #foreach( $pkg in $dependency.pkgconfig )
400 printf "checking for pkg-config package $pkg.name... " 407 print_check_msg "${D}dep_pkgconfig_checked_${pkg.id}" "checking for pkg-config package $pkg.name... "
401 if test_pkg_config "$pkg.name" "$pkg.atleast" "$pkg.exact" "$pkg.max" ; then 408 if test_pkg_config "$pkg.name" "$pkg.atleast" "$pkg.exact" "$pkg.max" ; then
402 echo yes 409 print_check_msg "${D}dep_pkgconfig_checked_${pkg.id}" "yes\n"
410 dep_pkgconfig_checked_${pkg.id}=1
403 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags $pkg.name`" 411 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags $pkg.name`"
404 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs $pkg.name`" 412 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs $pkg.name`"
405 else 413 else
406 echo no 414 print_check_msg "${D}dep_pkgconfig_checked_${pkg.id}" "no\n"
415 dep_pkgconfig_checked_${pkg.id}=1
407 ERROR=1 416 ERROR=1
408 break 417 break
409 fi 418 fi
410 #end 419 #end
411 420
636 write_toolchain_defaults "$TEMP_DIR/toolchain.mk" 645 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
637 cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk 646 cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
638 rm -Rf "$TEMP_DIR" 647 rm -Rf "$TEMP_DIR"
639 648
640 649
650

mercurial