author | sandman <sandman> | 2002-06-26 23:13:50 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-06-26 23:13:50 (UTC) |
commit | b13d95b210c7d16229514afc66e32a1de09a075c (patch) (unidiff) | |
tree | 341d10953319693d0fd1a51edeb5cbb83ad5bcf4 /configure | |
parent | de4d8f77c0b0eba84a0a0240b5cf439c3e5243a4 (diff) | |
download | opie-b13d95b210c7d16229514afc66e32a1de09a075c.zip opie-b13d95b210c7d16229514afc66e32a1de09a075c.tar.gz opie-b13d95b210c7d16229514afc66e32a1de09a075c.tar.bz2 |
Major pro file overhaul from davipt. Commited by me, since it touches
many core files ... please report bugs on this to davipt
-rwxr-xr-x | configure | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -74,136 +74,136 @@ while [ -n "$1" ]; do | |||
74 | ;; | 74 | ;; |
75 | -qconfig) | 75 | -qconfig) |
76 | # optional way to specify the qconfig-qpe.h is to pass -qconfig qpe | 76 | # optional way to specify the qconfig-qpe.h is to pass -qconfig qpe |
77 | shift; QCONFIGARG=DEFINES+=QCONFIG='\"'$1'\"' # Don't quote me on that. | 77 | shift; QCONFIGARG=DEFINES+=QCONFIG='\"'$1'\"' # Don't quote me on that. |
78 | ;; | 78 | ;; |
79 | -make) | 79 | -make) |
80 | shift; TOMAKE="$TOMAKE $1" | 80 | shift; TOMAKE="$TOMAKE $1" |
81 | ;; | 81 | ;; |
82 | -qt3) | 82 | -qt3) |
83 | QT3=yes | 83 | QT3=yes |
84 | ;; | 84 | ;; |
85 | *) | 85 | *) |
86 | HELP=yes;; | 86 | HELP=yes;; |
87 | esac | 87 | esac |
88 | shift | 88 | shift |
89 | done | 89 | done |
90 | 90 | ||
91 | TARGET=configs/$PLATFORM-$SHARING$DEBUG | 91 | TARGET=configs/$PLATFORM-$SHARING$DEBUG |
92 | 92 | ||
93 | if [ '!' -f $TARGET ] | 93 | if [ '!' -f $TARGET ] |
94 | then | 94 | then |
95 | if [ -f configs/linux-$PLATFORM-g++-$SHARING$DEBUG ] | 95 | if [ -f configs/linux-$PLATFORM-g++-$SHARING$DEBUG ] |
96 | then | 96 | then |
97 | TARGET=configs/linux-$PLATFORM-g++-$SHARING$DEBUG | 97 | TARGET=configs/linux-$PLATFORM-g++-$SHARING$DEBUG |
98 | PLATFORM=linux-$PLATFORM-g++ | ||
98 | else | 99 | else |
99 | echo | 100 | echo |
100 | echo ' The specified platform/compiler not supported: ' $TARGET | 101 | echo ' The specified platform/compiler not supported: ' $TARGET |
101 | echo | 102 | echo |
102 | exit 2 | 103 | exit 2 |
103 | fi | 104 | fi |
104 | fi | 105 | fi |
105 | 106 | ||
106 | # Next, emit a usage message if something failed. | 107 | # Next, emit a usage message if something failed. |
107 | 108 | ||
108 | if [ "$HELP" = "yes" ]; then | 109 | if [ "$HELP" = "yes" ]; then |
109 | cat <<EOF | 110 | cat <<EOF |
110 | Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] | 111 | Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] |
111 | 112 | ||
112 | The defaults (*) are usually acceptable. Here is a short explanation of | 113 | The defaults (*) are usually acceptable. Here is a short explanation of |
113 | each option: | 114 | each option: |
114 | 115 | ||
115 | * -release ........... Compile and link Qt with debugging turned off. | 116 | * -release ........... Compile and link Qt with debugging turned off. |
116 | -debug ............. Compile and link Qt with debugging turned on. | 117 | -debug ............. Compile and link Qt with debugging turned on. |
117 | 118 | ||
118 | * -shared ............ Create and use a shared Qt library (libqt.so) | 119 | * -shared ............ Create and use a shared Qt library (libqt.so) |
119 | -static ............ Create and use a static Qt library (libqt.a) | 120 | -static ............ Create and use a static Qt library (libqt.a) |
120 | 121 | ||
121 | -qt3 ............... Configure for use with Qt 3.x | 122 | -qt3 ............... Configure for use with Qt 3.x |
122 | 123 | ||
123 | -platform target ... The platform you are building on ($PLATFORM) | 124 | -platform target ... The platform you are building on ($PLATFORM) |
124 | EOF | 125 | EOF |
125 | exit 0; | 126 | exit 0; |
126 | fi | 127 | fi |
127 | 128 | ||
128 | CUSTOM=`echo $PLATFORM | sed -n -e "s/.*-\(.*\)-.*/\1/p"` | 129 | CUSTOM=`echo $PLATFORM | sed -n -e "s/.*-\(.*\)-.*/\1/p"` |
129 | 130 | ||
130 | if [ -f library/custom-$CUSTOM.h ] | 131 | if [ -f library/custom-$CUSTOM.h ] |
131 | then | 132 | then |
132 | rm -f library/custom.h | 133 | rm -f library/custom.h |
133 | ln -s custom-$CUSTOM.h library/custom.h | 134 | ln -s custom-$CUSTOM.h library/custom.h |
134 | fi | 135 | fi |
135 | 136 | ||
136 | mkdir -p include/qpe | 137 | mkdir -p include/qpe |
137 | ( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) | 138 | ( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) |
138 | 139 | ||
139 | mkdir -p include/opie | 140 | mkdir -p include/opie |
140 | ( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; ) | 141 | ( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; ) |
141 | 142 | ||
142 | |||
143 | echo Creating makefiles... | 143 | echo Creating makefiles... |
144 | 144 | ||
145 | # Set version for library directly | 145 | # Set version for library directly |
146 | # Version 1.5.0 right now for compat. | 146 | # Version 1.5.0 right now for compat. |
147 | sed -e 's/^\(VERSION.*= \).*/\1'1.5.0.$VERSION_PAT/ <library/library.pro >library/library.pro-v | 147 | sed -e 's/^\(VERSION.*= \).*/\1'1.5.0.$VERSION_PAT/ <library/library.pro >library/library.pro-v |
148 | mv library/library.pro-v library/library.pro | 148 | mv library/library.pro-v library/library.pro |
149 | 149 | ||
150 | if [ "$QT3" = yes ] | 150 | if [ "$QT3" = yes ] |
151 | then | 151 | then |
152 | VCONFIG="CONFIG+=qt3" | 152 | VCONFIG="CONFIG+=qt3" |
153 | else | 153 | else |
154 | VCONFIG="CONFIG+=qt2" | 154 | VCONFIG="CONFIG+=qt2" |
155 | fi | 155 | fi |
156 | 156 | ||
157 | if [ -f $TMAKEPATH/tmake.conf ] | 157 | if [ -f $TMAKEPATH/tmake.conf ] |
158 | then | 158 | then |
159 | # You have tmake. We'll regenerate the file for you... | 159 | # You have tmake. We'll regenerate the file for you... |
160 | echo "Makefiles will be regenerated." | 160 | echo "Makefiles will be regenerated." |
161 | fi | 161 | fi |
162 | 162 | ||
163 | H=`pwd` | 163 | H=`pwd` |
164 | if [ -z "$TOMAKE" ] | 164 | if [ -z "$TOMAKE" ] |
165 | then | 165 | then |
166 | TOMAKE=`make showcomponents` | 166 | TOMAKE=`make showcomponents` |
167 | fi | 167 | fi |
168 | 168 | ||
169 | for a in $TOMAKE ; do | 169 | for a in $TOMAKE ; do |
170 | N=$a/Makefile | 170 | N=$a/Makefile |
171 | M=$a/Makefile.in | 171 | M=$a/Makefile.in |
172 | O=$a/Makefile.add | 172 | O=$a/Makefile.add |
173 | f=`basename $a` | 173 | f=`basename $a` |
174 | 174 | ||
175 | if [ -f "$TMAKEPATH/tmake.conf" -a -f "$a/$f.pro" ] | 175 | if [ -f "$TMAKEPATH/tmake.conf" -a -f "$a/$f.pro" ] |
176 | then | 176 | then |
177 | ( cd $a; | 177 | ( cd $a; |
178 | TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ | 178 | TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ |
179 | tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ | 179 | tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ |
180 | -t $H/qt/tmake/propagate.t $f.pro | | 180 | -t $H/qt/tmake/propagate.t $f.pro | |
181 | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; | 181 | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; |
182 | ) | 182 | ) |
183 | echo -n "." | 183 | echo -n "." |
184 | #echo Building $N.. | 184 | #echo Building $N.. |
185 | appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | sed 's/ //g'` | 185 | appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | tr -d " \t"` |
186 | translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` | 186 | translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` |
187 | if [ -n "$translation" -a -n "$appname" ] | 187 | if [ -n "$translation" -a -n "$appname" ] |
188 | then | 188 | then |
189 | if [ "$appname" != "$translation" ] | 189 | if [ "$appname" != "$translation" ] |
190 | then | 190 | then |
191 | echo | 191 | echo |
192 | echo "Warning: translation and appname disagree in $a/$f.pro" | 192 | echo "Warning: translation and appname disagree in $a/$f.pro" |
193 | fi | 193 | fi |
194 | fi | 194 | fi |
195 | 195 | ||
196 | fi | 196 | fi |
197 | 197 | ||
198 | cat > $N <<EOF | 198 | cat > $N <<EOF |
199 | ############################################################################# | 199 | ############################################################################# |
200 | # Automatically generated from $M | 200 | # Automatically generated from $M |
201 | # Build options from $1 | 201 | # Build options from $1 |
202 | ############################################################################# | 202 | ############################################################################# |
203 | 203 | ||
204 | EOF | 204 | EOF |
205 | 205 | ||
206 | SED= | 206 | SED= |
207 | PLATFORM_CFLAGS= | 207 | PLATFORM_CFLAGS= |
208 | 208 | ||
209 | if [ "$f" = "embeddedkonsole" ] | 209 | if [ "$f" = "embeddedkonsole" ] |