Skip to content

HTTPS clone URL

Subversion checkout URL

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