source: gs2-extensions/gnome-lib/trunk/src/devel.bash@ 28303

Last change on this file since 28303 was 28303, checked in by ak19, 11 years ago

Dr Bainbridge fixed a crucial problem in the gnomelib devel.bash file, which had thus far prevented configure from being able to source it successfully and remember the env vars set in it. Need to always source dot-slash-script, not source script.

File size: 1.5 KB
Line 
1#!/bin/bash
2
3if [ -d cascade-make ] ; then
4 source cascade-make/lib/cascade-lib.bash GEXTGNOME . $*
5fi
6
7if [ -z $GEXTGNOME ] ; then
8 source ./setup.bash_old
9fi
10
11if [ -z $GEXTGNOME_DEVEL ] ; then
12 # Set environment variable so we can tell devel.bash has been sourced
13 export GEXTGNOME_DEVEL=$GEXTGNOME
14
15 export PATH="$GEXTGNOME_INSTALLED/bin:$PATH"
16 export CFLAGS="-I$GEXTGNOME_INSTALLED/include $CFLAGS"
17 export CPPFLAGS="-I$GEXTGNOME_INSTALLED/include $CPPFLAGS"
18 export CXXFLAGS="-I$GEXTGNOME_INSTALLED/include $CXXFLAGS"
19 export LDFLAGS="-L$GEXTGNOME_INSTALLED/lib $LDFLAGS"
20 export PKG_CONFIG_PATH="$GEXTGNOME_INSTALLED/lib/pkgconfig:$PKG_CONFIG_PATH"
21
22 echo "+Your environment is now setup to compile with the GNOME Support Library"
23
24 if [ -d "$GEXTGNOME_INSTALLED/lib/pkgconfig" ] ; then
25 echo ""
26 echo "+Testing that pkg-config is correctly configured..."
27
28 pushd $GEXTGNOME_INSTALLED/lib/pkgconfig
29
30 if [ ! -e .fixed-prefix.awk ] ; then
31
32 echo "Configuring ..."
33
34 echo "/^prefix=/ { print \"prefix=$GEXTGNOME_INSTALLED\" ; next }" > .fixed-prefix.awk
35 echo " { print \$0 }" >> .fixed-prefix.awk
36
37 for file in *.pc ; do
38 cat $file | awk -f .fixed-prefix.awk > $file.new && \
39 /bin/mv $file.new $file
40 done
41 echo "... done"
42 else
43 echo "No configuration needed"
44 fi
45
46 popd
47 fi
48else
49 echo "+Your environment is already setup to compile with the GNOME Support Library"
50fi
Note: See TracBrowser for help on using the repository browser.