view more/ @ 1391:42ec661e3916

Fix BINARY_PACKAGE_TARBALLS generation: some packages produce no output (zlib used to build dropbear for example), and thus check for an empty list before trying to make a tarball.
author Rob Landley <>
date Fri, 17 Jun 2011 13:00:17 -0500
parents 878dbfe76341
children e2f722cc97a6
line wrap: on
line source


source sources/ || 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