Changeset 245

Show
Ignore:
Timestamp:
04/25/08 15:02:30 (9 months ago)
Author:
conrad
Message:

swap order of checking for cabal and configure, as some haskell stuff
uses cabal to wrap autoconf

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • home/bin/build

    r244 r245  
    221221  if [ -e Kbuild ] ; then 
    222222    build_kernel "Configuring" menuconfig 
     223  elif [ -e Setup.lhs -o -e Setup.hs ] ; then 
     224    build_cabal_customize 
     225    build_try_run "Configuring cabalized Haskell source" \ 
     226      runhaskell $CABAL_SETUP configure --user --prefix=$HOME/usr $CABAL_FLAGS $* 
    223227  elif [ -e configure ] ; then 
    224228    build_configure_customize 
    225229    build_in_builddir  $srcdir/configure $CONFIGURE_FLAGS $* 
    226   elif [ -e Setup.lhs -o -e Setup.hs ] ; then 
    227     build_cabal_customize 
    228     build_try_run "Configuring cabalized Haskell source" \ 
    229       runhaskell $CABAL_SETUP configure --user --prefix=$HOME/usr $CABAL_FLAGS $* 
    230230  fi 
    231231} 
     
    235235  if [ -e Kbuild ] ; then 
    236236    build_kernel "Building" 
     237  elif [ -e Setup.lhs -o -e Setup.hs ] ; then 
     238    build_cabal_customize 
     239    build_try_run "Building cabalized Haskell source" \ 
     240      runhaskell $CABAL_SETUP build $CABAL_FLAGS $* 
    237241  elif [ -e $builddir/Makefile -o -e $builddir/makefile -o \ 
    238242       -e Makefile -o -e makefile ] ; then 
    239243    build_in_builddir $MAKE $* 
    240   elif [ -e Setup.lhs -o -e Setup.hs ] ; then 
     244  fi 
     245
     246 
     247build_check () { 
     248  builddir=$(build_get_dir) 
     249  if [ -e Setup.lhs -o -e Setup.hs ] ; then 
    241250    build_cabal_customize 
    242251    build_try_run "Building cabalized Haskell source" \ 
    243       runhaskell $CABAL_SETUP build $CABAL_FLAGS $* 
    244   fi 
    245 
    246  
    247 build_check () { 
    248   builddir=$(build_get_dir) 
    249   if [ -e $builddir/Makefile -o -e $builddir/makefile -o \ 
     252      runhaskell $CABAL_SETUP test $CABAL_FLAGS $* 
     253  elif [ -e $builddir/Makefile -o -e $builddir/makefile -o \ 
    250254       -e Makefile -o -e makefile ] ; then 
    251255    build_in_builddir $MAKE check $* 
    252   elif [ -e Setup.lhs -o -e Setup.hs ] ; then 
    253     build_cabal_customize 
    254     build_try_run "Building cabalized Haskell source" \ 
    255       runhaskell $CABAL_SETUP test $CABAL_FLAGS $* 
    256256  fi 
    257257} 
     
    259259build_install () { 
    260260  builddir=$(build_get_dir) 
    261   if [ -e $builddir/Makefile -o -e $builddir/makefile -o \ 
     261  if [ -e Setup.lhs -o -e Setup.hs ] ; then 
     262    build_cabal_customize 
     263    build_try_run "Installing cabalized Haskell source" \ 
     264      runhaskell $CABAL_SETUP install --user $CABAL_FLAGS $* 
     265  elif [ -e $builddir/Makefile -o -e $builddir/makefile -o \ 
    262266       -e Makefile -o -e makefile ] ; then 
    263267    build_in_builddir make install $* 
    264   elif [ -e Setup.lhs -o -e Setup.hs ] ; then 
    265     build_cabal_customize 
    266     build_try_run "Installing cabalized Haskell source" \ 
    267       runhaskell $CABAL_SETUP install --user $CABAL_FLAGS $* 
    268268  fi 
    269269} 
     
    271271build_uninstall () { 
    272272  builddir=$(build_get_dir) 
    273   if [ -e $builddir/Makefile -o -e $builddir/makefile -o \ 
    274        -e Makefile -o -e makefile ] ; then 
    275     build_in_builddir make uninstall $* 
    276   elif [ -e Setup.lhs -o -e Setup.hs ] ; then 
     273  if [ -e Setup.lhs -o -e Setup.hs ] ; then 
    277274    build_cabal_customize 
    278275    echo "build: ERROR: I don't know how to uninstall cabalized Haskell source :-(" 
    279276    #build_try_run "Installing cabalized Haskell source" \ 
    280277    #  runhaskell $CABAL_SETUP uninstall --user $CABAL_FLAGS $* 
     278  elif [ -e $builddir/Makefile -o -e $builddir/makefile -o \ 
     279       -e Makefile -o -e makefile ] ; then 
     280    build_in_builddir make uninstall $* 
    281281  fi 
    282282} 
    283283 
    284284build_clean () { 
    285   if [ -e Kbuild -o build_intree_only ] ; then 
     285  if [ -e Kbuild -o $(build_intree_only) ] ; then 
    286286    build_make clean 
     287  elif [ -e Setup.lhs -o -e Setup.hs ] ; then 
     288    build_cabal_customize 
     289    build_try_run "Cleaning cabalized Haskell source" \ 
     290      runhaskell $CABAL_SETUP clean $CABAL_FLAGS $* 
    287291  else 
    288292    builddir=$(build_get_dir) 
     
    379383    build_ls $* 
    380384    ;; 
    381   clean
    382     build_clean 
     385  clean*
     386    build_clean $* 
    383387    ;; 
    384388  autogen*|mrproper)