Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 99 lines (88 sloc) 1.773 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
9738b6f @pjotrp Building libsequence
authored
17 # --with-libsequence
847bda6 @pjotrp Can make python example from configure
authored
18 # --with-example
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
19 #
20
21 if [ ! -d ./src ]; then
22 echo "FATAL: run from the root of the Biolib tree"
23 exit 1
24 fi
25
65e7617 @pjotrp Testing on cygwin
authored
26 if [ -d .git ]; then
0c0deb7 @pjotrp Introduce method to prevent updating git submodules automatically
authored
27 if [ ! -e .git/SKIP_SUBMODULE_UPDATE ]; then
28 echo "Checking for git submodules"
29 git submodule update --init
30 fi
65e7617 @pjotrp Testing on cygwin
authored
31 fi
32
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
33 language=$1
b35599f @pjotrp Added Ruby mapping for R/QTL
authored
34 if [ -z $language ]; then
35 language='--with-perl'
36 fi
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
37
38 case $language in
39 '--help')
40 echo "See the ./INSTALL document for configuration options"
41 exit 1
42 ;;
43 '--with-perl')
44 plang="-DBUILD_PERL:BOOLEAN=TRUE"
45 shift
46 ;;
47 '--with-ruby')
48 plang="-DBUILD_RUBY:BOOLEAN=TRUE"
49 shift
50 ;;
5d10c83 @pjotrp Adding Python support
authored
51 '--with-python')
52 plang="-DBUILD_PYTHON:BOOLEAN=TRUE"
53 shift
54 ;;
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
55 *)
56 echo "BioLib defaulting to Perl build"
57 plang="-DBUILD_PERL:BOOLEAN=TRUE"
58 library=$language
59 esac
60
61 if [ -z $library ]; then
62 library=$1
63 shift
64 fi
65
66 case $library in
67 '--with-staden')
68 plib="-DSTADEN_LIB:BOOLEAN=TRUE"
69 shift
70 ;;
71 '--with-affyio')
72 plib="-DAFFYIO_LIB:BOOLEAN=TRUE"
73 shift
74 ;;
9738b6f @pjotrp Building libsequence
authored
75 '--with-libsequence')
76 plib="-DLIBSEQUENCE_LIB:BOOLEAN=TRUE"
77 shift
78 ;;
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
79 '--with-rqtl')
80 plib="-DRQTL_LIB:BOOLEAN=TRUE"
81 shift
82 ;;
847bda6 @pjotrp Can make python example from configure
authored
83 '--with-example')
84 plib="-DEXAMPLE_LIB:BOOLEAN=TRUE"
85 shift
86 ;;
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
87 *)
88 echo "BioLib building all libraries"
89 plib=""
90 esac
91
92 echo $language: $plang
93 echo $library: $plib
94
fbfbe4e @pjotrp Added auto cleanup to configure wrapper
authored
95 sh scripts/cleanup.sh
96
5917e73 @pjotrp Adding 'configure' convenience wrapper
authored
97 echo cmake $plang $plib $* .
6efdc2f @pjotrp Renaming test support folder
authored
98 cmake $plang $plib $* .
Something went wrong with that request. Please try again.