|
diff --git a/configure b/configure index 0241adf..299e867 100755 --- a/ configure+++ b/ configure |
|
@@ -64,132 +64,134 @@ while [ -n "$1" ]; do |
64 | DEBUG= |
64 | DEBUG= |
65 | ;; |
65 | ;; |
66 | -debug) |
66 | -debug) |
67 | DEBUG=-debug |
67 | DEBUG=-debug |
68 | ;; |
68 | ;; |
69 | -shared) |
69 | -shared) |
70 | SHARING=shared |
70 | SHARING=shared |
71 | ;; |
71 | ;; |
72 | -static) |
72 | -static) |
73 | SHARING=static |
73 | SHARING=static |
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 | else |
98 | else |
99 | echo |
99 | echo |
100 | echo ' The specified platform/compiler not supported: ' $TARGET |
100 | echo ' The specified platform/compiler not supported: ' $TARGET |
101 | echo |
101 | echo |
102 | exit 2 |
102 | exit 2 |
103 | fi |
103 | fi |
104 | fi |
104 | fi |
105 | |
105 | |
106 | # Next, emit a usage message if something failed. |
106 | # Next, emit a usage message if something failed. |
107 | |
107 | |
108 | if [ "$HELP" = "yes" ]; then |
108 | if [ "$HELP" = "yes" ]; then |
109 | cat <<EOF |
109 | cat <<EOF |
110 | Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] |
110 | Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] |
111 | |
111 | |
112 | The defaults (*) are usually acceptable. Here is a short explanation of |
112 | The defaults (*) are usually acceptable. Here is a short explanation of |
113 | each option: |
113 | each option: |
114 | |
114 | |
115 | * -release ........... Compile and link Qt with debugging turned off. |
115 | * -release ........... Compile and link Qt with debugging turned off. |
116 | -debug ............. Compile and link Qt with debugging turned on. |
116 | -debug ............. Compile and link Qt with debugging turned on. |
117 | |
117 | |
118 | * -shared ............ Create and use a shared Qt library (libqt.so) |
118 | * -shared ............ Create and use a shared Qt library (libqt.so) |
119 | -static ............ Create and use a static Qt library (libqt.a) |
119 | -static ............ Create and use a static Qt library (libqt.a) |
120 | |
120 | |
121 | -qt3 ............... Configure for use with Qt 3.x |
121 | -qt3 ............... Configure for use with Qt 3.x |
122 | |
122 | |
123 | -platform target ... The platform you are building on ($PLATFORM) |
123 | -platform target ... The platform you are building on ($PLATFORM) |
124 | EOF |
124 | EOF |
125 | exit 0; |
125 | exit 0; |
126 | fi |
126 | fi |
127 | |
127 | |
128 | if [ -f library/custom-$PLATFORM.h ] |
128 | CUSTOM=`echo $PLATFORM | sed -n -e "s/.*-\(.*\)-.*/\1/p"` |
| |
129 | |
| |
130 | if [ -f library/custom-$CUSTOM.h ] |
129 | then |
131 | then |
130 | rm -f library/custom.h |
132 | rm -f library/custom.h |
131 | ln -s custom-$PLATFORM.h library/custom.h |
133 | ln -s custom-$CUSTOM.h library/custom.h |
132 | fi |
134 | fi |
133 | |
135 | |
134 | mkdir -p include/qpe |
136 | mkdir -p include/qpe |
135 | ( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) |
137 | ( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) |
136 | |
138 | |
137 | mkdir -p include/opie |
139 | mkdir -p include/opie |
138 | ( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; ) |
140 | ( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; ) |
139 | |
141 | |
140 | |
142 | |
141 | echo Creating makefiles... |
143 | echo Creating makefiles... |
142 | |
144 | |
143 | sed -e 's/^\(VERSION.*= \).*/\1'$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT/ <library/library.pro >library/library.pro-v |
145 | sed -e 's/^\(VERSION.*= \).*/\1'$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT/ <library/library.pro >library/library.pro-v |
144 | mv library/library.pro-v library/library.pro |
146 | mv library/library.pro-v library/library.pro |
145 | |
147 | |
146 | if [ "$QT3" = yes ] |
148 | if [ "$QT3" = yes ] |
147 | then |
149 | then |
148 | VCONFIG="CONFIG+=qt3" |
150 | VCONFIG="CONFIG+=qt3" |
149 | else |
151 | else |
150 | VCONFIG="CONFIG+=qt2" |
152 | VCONFIG="CONFIG+=qt2" |
151 | fi |
153 | fi |
152 | |
154 | |
153 | if [ -f $TMAKEPATH/tmake.conf ] |
155 | if [ -f $TMAKEPATH/tmake.conf ] |
154 | then |
156 | then |
155 | # You have tmake. We'll regenerate the file for you... |
157 | # You have tmake. We'll regenerate the file for you... |
156 | echo "Makefiles will be regenerated." |
158 | echo "Makefiles will be regenerated." |
157 | fi |
159 | fi |
158 | |
160 | |
159 | H=`pwd` |
161 | H=`pwd` |
160 | if [ -z "$TOMAKE" ] |
162 | if [ -z "$TOMAKE" ] |
161 | then |
163 | then |
162 | TOMAKE=`make showcomponents` |
164 | TOMAKE=`make showcomponents` |
163 | fi |
165 | fi |
164 | |
166 | |
165 | for a in $TOMAKE ; do |
167 | for a in $TOMAKE ; do |
166 | N=$a/Makefile |
168 | N=$a/Makefile |
167 | M=$a/Makefile.in |
169 | M=$a/Makefile.in |
168 | O=$a/Makefile.add |
170 | O=$a/Makefile.add |
169 | f=`basename $a` |
171 | f=`basename $a` |
170 | |
172 | |
171 | if [ -f $TMAKEPATH/tmake.conf -a -f $a/$f.pro ] |
173 | if [ -f $TMAKEPATH/tmake.conf -a -f $a/$f.pro ] |
172 | then |
174 | then |
173 | ( cd $a; |
175 | ( cd $a; |
174 | TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ |
176 | TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ |
175 | tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ |
177 | tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ |
176 | -t $H/qt/tmake/propagate.t $f.pro | |
178 | -t $H/qt/tmake/propagate.t $f.pro | |
177 | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; |
179 | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; |
178 | ) |
180 | ) |
179 | echo -n "." |
181 | echo -n "." |
180 | #echo Building $N.. |
182 | #echo Building $N.. |
181 | appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | sed 's/ //g'` |
183 | appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | sed 's/ //g'` |
182 | translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` |
184 | translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` |
183 | if [ -n "$translation" -a -n "$appname" ] |
185 | if [ -n "$translation" -a -n "$appname" ] |
184 | then |
186 | then |
185 | if [ $appname != $translation ] |
187 | if [ $appname != $translation ] |
186 | then |
188 | then |
187 | echo |
189 | echo |
188 | echo "Warning: translation and appname disagree in $a/$f.pro" |
190 | echo "Warning: translation and appname disagree in $a/$f.pro" |
189 | fi |
191 | fi |
190 | fi |
192 | fi |
191 | |
193 | |
192 | fi |
194 | fi |
193 | |
195 | |
194 | cat > $N <<EOF |
196 | cat > $N <<EOF |
195 | ############################################################################# |
197 | ############################################################################# |
|