Annotation of embedaddon/dnsmasq/bld/pkg-wrapper, revision 1.1.1.2
1.1 misho 1: #!/bin/sh
2:
3: search=$1
4: shift
1.1.1.2 ! misho 5: pkg=$1
! 6: shift
! 7: op=$1
! 8: shift
! 9:
! 10: in=`cat`
1.1 misho 11:
12: if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \
1.1.1.2 ! misho 13: echo $in | grep $search >/dev/null 2>&1; then
1.1 misho 14:
1.1.1.2 ! misho 15: if [ $op = "--copy" ]; then
! 16: pkg="$*"
! 17: elif grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
! 18: echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
! 19: pkg=`$pkg --static $op $*`
! 20: else
! 21: pkg=`$pkg $op $*`
! 22: fi
! 23:
! 24: if grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
! 25: echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
! 26: if [ $op = "--libs" ] || [ $op = "--copy" ]; then
! 27: echo "-Wl,-Bstatic $pkg -Wl,-Bdynamic"
! 28: else
! 29: echo "$pkg"
! 30: fi
! 31: else
! 32: echo "$pkg"
! 33: fi
! 34: fi
1.1 misho 35:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>