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