14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Megatest. If not, see <http://www.gnu.org/licenses/>.
# Configure the build
#======================================================================
# Configure stuff needed for eggs
#======================================================================
function configure_dependencies () {
|
>
>
>
>
>
>
>
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Megatest. If not, see <http://www.gnu.org/licenses/>.
# Configure the build
if [[ "$1"x == "x" ]];then
PREFIX=$PWD
else
PREFIX=$1
fi
#======================================================================
# Configure stuff needed for eggs
#======================================================================
function configure_dependencies () {
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
echo "" > makefile.inc
#======================================================================
# Do we need Chicken?
#======================================================================
if [[ ! $(type csi) ]];then
echo "Chicken build needed."
echo "BUILD_CHICKEN=yes" >> makefile.inc
configure_dependencies
echo "include chicken.makefile" >> makefile.inc
fi
echo "All done creating makefile.inc, feel free to edit it!"
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
|
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
echo "" > makefile.inc
#======================================================================
# Do we need Chicken?
#======================================================================
if [[ -e /usr/bin/sw_vers ]]; then
ARCHSTR=$(/usr/bin/sw_vers -productVersion)
else
ARCHSTR=$(lsb_release -sr)
fi
echo "CHICKEN_PREFIX=$PREFIX/.$ARCHSTR" >> makefile.inc
CHICKEN_PREFIX=$PREFIX/bin/.$ARCHSTR
if [[ ! $(type csi) ]];then
echo "Chicken build needed."
echo "BUILD_CHICKEN=yes" >> makefile.inc
configure_dependencies
echo "include chicken.makefile" >> makefile.inc
else
echo "CSIPATH=$(which csi)" >> makefile.inc
CSIPATH=$(which csi)
echo "CKPATH=$(dirname $(dirname $CSIPATH))" >> makefile.inc
fi
# Make setup scripts
echo "#!/bin/bash" > setup.sh
echo "export PATH=$CHICKEN_PREFIX/bin:\$PATH" >> setup.sh
echo "export LD_LIBRARY_PATH=$CHICKEN_PREFIX/lib" >> setup.sh
echo 'exec "$@"' >> setup.sh
chmod a+x setup.sh
echo "setenv PATH $CHICKEN_PREFIX/bin:\$PATH" > setup.csh
echo "setenv LD_LIBRARY_PATH $CHICKEN_PREFIX/lib" >> setup.csh
echo "All done creating makefile.inc, feel free to edit it!"
echo "run \"setup.sh bash\" or source setup.csh to get PATH and LD_LIBRARY_PATH adjusted"
|