3 TOPDIR
="$(cd $(dirname $(which $0)); pwd)"
6 PKGMK
=$TOPDIR/src
/pkgmk
7 PKGMK_CONF
=$TOPDIR/src
/pkgmk.conf
12 if [ "$1" != "-o" ]; then
13 PKGMK_ARGS
="$PKGMK_ARGS $1"
21 if [ ! -z "$PKGMK_OPTIMIZE" ]; then
22 _cflags
="$(grep "^
${PKGMK_OPTIMIZE}_CFLAGS
=" $PKGMK_CONF | cut -d'=' -f2- | sed 's|"||g
')"
23 if [ ! -z "$_cflags" ]; then
24 sed '/_CFLAGS
=/d
' $PKGMK_CONF | sed "s|CFLAGS=.*|CFLAGS=\"$_cflags\"|" > $TMP_CONF
25 PKGMK_CONF="$TMP_CONF"
27 echo "Error, invalid optimization: '$PKGMK_OPTIMIZE'"
32 $PKGMK -cf $PKGMK_CONF $PKGMK_ARGS