* aclocal wrapper: skip directories in ACLOCAL_PATH that don't exist,
otherwise aclocal barfs. Updated the builder to use makeWrapper * Made Automake 1.10 the default. * Fixed `make check' in Automake by turning off indented logging in Make (there is a flag for that now). * Disabled the `make check' in Automake by default because it takes a REALLY long time (e.g. more than 2 hours on Cygwin, 50 minutes on Darwin, 25 minutes on Linux) which is a lot for a package that otherwise takes 10 seconds to build. We can add a Hydra job with doCheck enabled to do regression testing. * make-wrapper: allow --run commands to add additional flags to the invocation of the wrapped program. An example is the aclocal wrapper: it adds additional -I ... flags. * make-wrapper: call the wrapped program .foo-wrapped instead of .wrapped-foo to make it easier to tell programs apart in `ps' output. svn path=/nixpkgs/branches/stdenv-updates/; revision=14885
This commit is contained in:
@@ -2,46 +2,25 @@ source $stdenv/setup
|
||||
|
||||
|
||||
postInstall() {
|
||||
|
||||
# Create a wrapper around `aclocal' that converts every element in
|
||||
# `ACLOCAL_PATH' into a `-I dir' option. This way `aclocal'
|
||||
# becomes modular; M4 macros do not need to be stored in a single
|
||||
# global directory, while callers of `aclocal' do not need to pass
|
||||
# `-I' options explicitly.
|
||||
|
||||
mv $out/bin/aclocal $out/bin/_tmp
|
||||
|
||||
for i in $out/bin/aclocal*; do
|
||||
rm $i
|
||||
ln -s aclocal $i
|
||||
done
|
||||
|
||||
cat > $out/bin/aclocal <<EOF
|
||||
#! $SHELL -e
|
||||
|
||||
oldIFS=\$IFS
|
||||
for prog in $out/bin/aclocal*; do
|
||||
wrapProgram $prog --run \
|
||||
'
|
||||
oldIFS=$IFS
|
||||
IFS=:
|
||||
extra=
|
||||
for i in \$ACLOCAL_PATH; do
|
||||
if test -n "\$i"; then
|
||||
extra="\$extra -I \$i"
|
||||
for dir in $ACLOCAL_PATH; do
|
||||
if test -n "$dir" -a -d "$dir"; then
|
||||
extraFlagsArray=("${extraFlagsArray[@]}" "-I" "$dir")
|
||||
fi
|
||||
done
|
||||
IFS=\$oldIFS
|
||||
|
||||
exec $out/bin/aclocal-orig \${extra[@]} "\$@"
|
||||
EOF
|
||||
chmod +x $out/bin/aclocal
|
||||
mv $out/bin/_tmp $out/bin/aclocal-orig
|
||||
|
||||
|
||||
# Automatically let `ACLOCAL_PATH' include all build inputs that
|
||||
# have a `.../share/aclocal' directory.
|
||||
test -x $out/nix-support || mkdir $out/nix-support
|
||||
cp -p $setupHook $out/nix-support/setup-hook
|
||||
|
||||
IFS=$oldIFS'
|
||||
done
|
||||
}
|
||||
postInstall=postInstall
|
||||
|
||||
|
||||
genericBuild
|
||||
|
||||
Reference in New Issue
Block a user