view more/record-commands.sh @ 1328:08d92a215472

Albert Lee spotted that libnsl went away after 0.9.11 due to the baseconfig stuff dropping a uClibc symbol. Put it back.
author Rob Landley <rob@landley.net>
date Tue, 08 Feb 2011 12:11:04 -0600
parents 878dbfe76341
children e2f722cc97a6
line wrap: on
line source

#!/bin/bash

source sources/include.sh || exit 1

# Build a wrapper that records each command line the build runs out of the
# host's $PATH, so we know exactly what commands the build uses.

# (Note: this misses things called via absolute paths, such as the #!/bin/bash
# at the start of shell scripts.)

echo "=== Setting up command recording wrapper"

[ -f "$WRAPDIR/wrappy" ] && PATH="$OLDPATH"
[ -f "$HOSTTOOLS/busybox" ] && PATH="$HOSTTOOLS"
blank_tempdir "$WRAPDIR"

# Populate a directory of symlinks with every command in the $PATH.

path_search "$PATH" "*" 'ln -s wrappy "$WRAPDIR/$FILE"' | dotprogress

# Build the wrapper
$CC -Os "$SOURCES/toys/wrappy.c" -o "$WRAPDIR/wrappy"  || dienow