Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 94 lines (83 sloc) 1.676 kb
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
1 #! /bin/bash
2 #
3 # This is a simple dropin for configure - so as to make life easier
4 # for newcomers to cmake.
5 #
6 # A number of switches gets translated use ./configure with:
7 #
8 # --with-perl : build biolib for Perl (default)
9 # --with-ruby : build biolib for Ruby
10 # --with-python : build biolib for Python
11 #
12 # In addition libraries can be specified
13
14 # --with-staden : see the BioLib docs
15 # --with-affyio
16 # --with-rqtl
847bda6 @pjotrp Can make python example from configure
authored
17 # --with-example
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
18 #
19
20 if [ ! -d ./src ]; then
21 echo "FATAL: run from the root of the Biolib tree"
22 exit 1
23 fi
24
65e7617 @pjotrp Testing on cygwin
authored
25 if [ -d .git ]; then
0c0deb7 @pjotrp Introduce method to prevent updating git submodules automatically
authored
26 if [ ! -e .git/SKIP_SUBMODULE_UPDATE ]; then
27 echo "Checking for git submodules"
28 git submodule update --init
29 fi
65e7617 @pjotrp Testing on cygwin
authored
30 fi
31
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
32 language=$1
b35599f @pjotrp Added Ruby mapping for R/QTL
authored
33 if [ -z $language ]; then
34 language='--with-perl'
35 fi
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
36
37 case $language in
38 '--help')
39 echo "See the ./INSTALL document for configuration options"
40 exit 1
41 ;;
42 '--with-perl')
43 plang="-DBUILD_PERL:BOOLEAN=TRUE"
44 shift
45 ;;
46 '--with-ruby')
47 plang="-DBUILD_RUBY:BOOLEAN=TRUE"
48 shift
49 ;;
5d10c83 @pjotrp Adding Python support
authored
50 '--with-python')
51 plang="-DBUILD_PYTHON:BOOLEAN=TRUE"
52 shift
53 ;;
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
54 *)
55 echo "BioLib defaulting to Perl build"
56 plang="-DBUILD_PERL:BOOLEAN=TRUE"
57 library=$language
58 esac
59
60 if [ -z $library ]; then
61 library=$1
62 shift
63 fi
64
65 case $library in
66 '--with-staden')
67 plib="-DSTADEN_LIB:BOOLEAN=TRUE"
68 shift
69 ;;
70 '--with-affyio')
71 plib="-DAFFYIO_LIB:BOOLEAN=TRUE"
72 shift
73 ;;
74 '--with-rqtl')
75 plib="-DRQTL_LIB:BOOLEAN=TRUE"
76 shift
77 ;;
847bda6 @pjotrp Can make python example from configure
authored
78 '--with-example')
79 plib="-DEXAMPLE_LIB:BOOLEAN=TRUE"
80 shift
81 ;;
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
82 *)
83 echo "BioLib building all libraries"
84 plib=""
85 esac
86
87 echo $language: $plang
88 echo $library: $plib
89
fbfbe4e @pjotrp Added auto cleanup to configure wrapper
authored
90 sh scripts/cleanup.sh
91
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
92 echo cmake $plang $plib $* .
6efdc2f @pjotrp Renaming test support folder
authored
93 cmake $plang $plib $* .
Something went wrong with that request. Please try again.