Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 34 lines (29 sloc) 0.763 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#!/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.