Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 509786
Collapse All | Expand All

(-)autotools.eclass (-3 / +6 lines)
Lines 353-359 Link Here
353
	done
353
	done
354
354
355
	_automake_version() {
355
	_automake_version() {
356
		autotools_run_tool automake --version 2>/dev/null | sed -n -e '1{s:.*(GNU automake) ::p;q}'
356
		autotools_run_tool --output automake --version 2>/dev/null | sed -n -e '/\(GNU automake\)/{s:.*(GNU automake) ::;s:-p[0-9]::p;q}'
357
	}
357
	}
358
358
359
	if [[ -z ${makefile_name} ]] ; then
359
	if [[ -z ${makefile_name} ]] ; then
Lines 435-453 Link Here
435
}
435
}
436
436
437
# @FUNCTION: autotools_run_tool
437
# @FUNCTION: autotools_run_tool
438
# @USAGE: [--at-no-fail] [--at-m4flags] [--at-missing] <autotool> [tool-specific flags]
438
# @USAGE: [--at-no-fail] [--at-m4flags] [--at-missing] [--output] <autotool> [tool-specific flags]
439
# @INTERNAL
439
# @INTERNAL
440
# @DESCRIPTION:
440
# @DESCRIPTION:
441
# Run the specified autotool helper, but do logging and error checking
441
# Run the specified autotool helper, but do logging and error checking
442
# around it in the process.
442
# around it in the process.
443
autotools_run_tool() {
443
autotools_run_tool() {
444
	# Process our own internal flags first
444
	# Process our own internal flags first
445
	local autofail=true m4flags=false missing_ok=false
445
	local autofail=true m4flags=false missing_ok=false return_output=false
446
	while [[ -n $1 ]] ; do
446
	while [[ -n $1 ]] ; do
447
		case $1 in
447
		case $1 in
448
		--at-no-fail) autofail=false;;
448
		--at-no-fail) autofail=false;;
449
		--at-m4flags) m4flags=true;;
449
		--at-m4flags) m4flags=true;;
450
		--at-missing) missing_ok=true;;
450
		--at-missing) missing_ok=true;;
451
		--output) return_output=true;;
451
		# whatever is left goes to the actual tool
452
		# whatever is left goes to the actual tool
452
		*) break;;
453
		*) break;;
453
		esac
454
		esac
Lines 495-500 Link Here
495
		echo
496
		echo
496
		die "Failed Running $1 !"
497
		die "Failed Running $1 !"
497
	fi
498
	fi
499
	if ! ${return_output} ; then return $? ; fi
500
	cat "${STDERR_TARGET}"
498
}
501
}
499
502
500
# Internal function to check for support
503
# Internal function to check for support

Return to bug 509786