From 074f450ab36faf9a7168089d7c26f9607041d23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 6 May 2010 11:52:43 +0000 Subject: [PATCH] Linux: Patch incorrect absolute paths in makefiles. svn path=/nixpkgs/trunk/; revision=21623 --- pkgs/os-specific/linux/kernel/builder.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/builder.sh b/pkgs/os-specific/linux/kernel/builder.sh index b4fc969b05d5..e79f10cc7d83 100644 --- a/pkgs/os-specific/linux/kernel/builder.sh +++ b/pkgs/os-specific/linux/kernel/builder.sh @@ -6,6 +6,15 @@ if [ -n "$crossConfig" ]; then makeFlags="$makeFlags CROSS_COMPILE=$crossConfig-" fi +postPatch() { + # Makefiles are full of /bin/pwd, /bin/false, /bin/bash, etc. + # Patch these away, assuming the tools are in $PATH. + for mf in $(find -name Makefile); do + echo "stripping FHS paths in \`$mf'..." + sed -i "$mf" -e 's|/usr/bin/||g ; s|/bin/||g' + done +} + configurePhase() { if test -n "$preConfigure"; then eval "$preConfigure";