Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (29 sloc) 763 Bytes
#!/bin/sh
set -e
. rpg-sh-setup
[ "$*" ] || set -- '--help'
ARGV="$@"
USAGE '${PROGNAME} <path>
Build native extensions for a package.
The paths to newly built libraries are written on standard output. Exits with
success if the build succeeds, failure otherwise.'
path="$(cd "$1" && pwd)"
test -d "$path/ext" ||
exit 0
find "$path/ext" -name "extconf.rb" |
while read file
do
heed "$(basename "$path") $(basename $(dirname "$file"))"
cd "$(dirname "$file")"
if (ruby extconf.rb &&
{ make clean || true; } &&
make) 1> build.log 2>&1
then
$RPGSHOWBUILD && cat build.log 1>&2
find "$(dirname "$file")" -name "*.$(ruby_dlext)"
else
status=$?
cat build.log 1>&2
exit $status
fi
done
Something went wrong with that request. Please try again.