Changeset 27273

Show
Ignore:
Timestamp:
29.04.2013 15:21:21 (7 years ago)
Author:
davidb
Message:

function for calling 'make' extended to allow passing of variable number of additional arguments. Allows for usage such as 'make install DESTDIR=/foo/bar

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/cascade-make/trunk/lib/cascade-lib.bash

    r26789 r27273  
    212212opt_run_make() 
    213213{ 
    214   local type=$1 
    215   local package=$2 
    216   local version=$3 
     214  local type=$1; shift 
     215  local package=$1; shift 
     216  local version=$1; shift 
    217217  local opt_target="" 
    218218 
    219   if [ ! -z "$4" ] ; then 
    220     opt_target=$4 
     219  if [ ! -z "$1" ] ; then 
     220    opt_target=$1; shift 
    221221  fi 
    222222 
    223223  if [ $type = "1" ] ; then 
    224224    ( cd $package$version ; \ 
    225       make $opt_target) 
     225      make $opt_target $@) 
    226226 
    227227    if [ $? != 0 ] ; then