From 4d7d10da6b196c43aaa4eb0e79202560395a4c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 7 Jul 2011 15:10:40 +0000 Subject: [PATCH] GNU Automake: Append `-I' flags stemming from $ACLOCAL_PATH instead of prepending them. See for an illustration of the bug. svn path=/nixpkgs/trunk/; revision=27622 --- .../tools/misc/automake/builder.sh | 39 ++++++++++++++----- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/misc/automake/builder.sh b/pkgs/development/tools/misc/automake/builder.sh index 6b0cd7e4fa22..7f9e9219de31 100644 --- a/pkgs/development/tools/misc/automake/builder.sh +++ b/pkgs/development/tools/misc/automake/builder.sh @@ -1,5 +1,33 @@ source $stdenv/setup +# Wrap the given `aclocal' program, appending extra `-I' flags +# corresponding to the directories listed in $ACLOCAL_PATH. (Note +# that `wrapProgram' can't be used for that purpose since it can only +# prepend flags, not append them.) +wrapAclocal() { + local program="$1" + local wrapped="$(dirname $program)/.$(basename $program)-wrapped" + + mv "$program" "$wrapped" + cat > "$program"<