root/gs2-extensions/gnome-lib/trunk/src/devel.bash @ 23096

Revision 23096, 1.4 KB (checked in by sjm84, 10 years ago)

Upgraded this extension to use the exthome variable correctly and a few other minor fixes

Line 
1#!/bin/bash
2
3if [ -d cascade-make ] ; then
4  source cascade-make/lib/cascade-lib.bash GEXTGNOME . $*
5fi
6
7if [ "x$GEXTGNOME" = "x" ] ; then
8    source setup.bash
9fi
10
11if [ "x$GEXTGNOME_DEVEL" = "x" ] ; 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   
21    echo "+Your environment is now setup to compile with the GNOME Support Library"
22
23    if [ -d "$GEXTGNOME_INSTALLED/lib/pkgconfig" ] ; then
24        echo ""
25        echo "+Testing that pkg-config is correctly configured..."
26
27        pushd $GEXTGNOME_INSTALLED/lib/pkgconfig
28
29        if [ ! -e .fixed-prefix.awk ] ; then
30
31            echo "Configuring ..."
32
33            echo "/^prefix=/ { print \"prefix=$GEXTGNOME_INSTALLED\" ; next }" > .fixed-prefix.awk
34            echo "  { print \$0 }" >> .fixed-prefix.awk
35
36            for file in *.pc ; do
37                cat $file | awk -f .fixed-prefix.awk > $file.new && \
38                  /bin/mv $file.new $file
39            done
40            echo "... done"
41        else
42            echo "No configuration needed"
43        fi
44
45        popd
46    fi
47else
48    echo "+Your environment is already setup to compile with the GNOME Support Library"
49fi
Note: See TracBrowser for help on using the browser.