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

Last change on this file since 23082 was 23082, checked in by sjm84, 11 years ago

Added a missing backslash

File size: 1.8 KB
Line 
1#!/bin/bash
2
3if [ -d cascade-make ] ; then
4 source cascade-make/lib/cascade-lib.bash
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# pcfilelist=`ls *.pc`
30# firstfile=`$pcfilelist | head -1`
31# pkgconfigprefix=`awk '/^prefix=/{ sub(/^prefix=/, "") ; print }' $firstfile`
32
33# if [ "$pkgconfigprefix" = "$GEXTGNOME_INSTALLED" ] ; then
34# echo "OK"
35# else
36# echo "NO - Correcting configuration..."
37
38# for file in $pcfilelist ; do
39# awk '{ sub(/^prefix=\/.*$/, "prefix=$GEXTGNOME_INSTALLED") ; print }' $file > $file
40# done
41#
42# echo "COMPLETE"
43# fi
44
45
46 if [ ! -e .fixed-prefix.awk ] ; then
47
48 echo "Configuring ..."
49
50 echo "/^prefix=/ { print \"prefix=$GEXTGNOME_INSTALLED\" ; next }" > .fixed-prefix.awk
51 echo " { print \$0 }" >> .fixed-prefix.awk
52
53 for file in *.pc ; do
54 cat $file | awk -f .fixed-prefix.awk > $file.new && \
55 /bin/mv $file.new $file
56 done
57 echo "... done"
58 else
59 echo "No configuration needed"
60 fi
61
62 popd
63 fi
64else
65 echo "+Your environment is already setup to compile with the GNOME Support Library"
66fi
Note: See TracBrowser for help on using the repository browser.