[list] RE: [list] qt 3.1 port planing
Ralf Habacker
kde-cygwin@mail.kde.org
Mon, 18 Nov 2002 10:32:08 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_0128_01C28EED.BF4A8300
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
>
> > > > If someone like to join this task (or will take this task)
> > let me know.
> > > Looks like I'll have Saturday free, so I can play about with
> > this then. Let
> > > me know if there's anything specific you want me to do.
> > >
> > Chris, I have recognized some issues with qmake and Makefile
> > generation. The
> > patches I have applied for qt 3.0.4 does not work at all. Do you feel
> > comfortable to fix this issues ?
> I did do a patch for this once, but I'm not sure I still have it.
> Nethertheless I can pretty much remember what I changed. I didn't have a
> chance to look at this on Saturday, but I may tomorrow (Monday), I'll keep
> you informed.
>
Chris,
thank you for your help.
Please note, that qt-3 qmake has some cygwin support provided with the following
flag:
if (!project->isEmpty("QMAKE_CYGWIN_SHLIB"))
// cygwin stuff
else
// other os
I've tried to apply our changes from qt2 (see the appended patch), but had
problem with this see BUGS.cygwin).
Perhaps this helps you and save some time.
One major thing is adding the exe extension. In qt-2 I have used the following:
EXT=`echo $(MACHTYPE) | grep "pc-cygwin" | sed "s/.*pc-cygwin/.exe/g"`
but I don't know if this helps us in qt-3.
Ralf
------=_NextPart_000_0128_01C28EED.BF4A8300
Content-Type: application/octet-stream;
name="qmake.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="qmake.patch"
If so and you does not know about the cvs structure perhaps it helps to =
give you a hint how to merge in the newest imports (Probably you know =
this)
$ cvs co -r QT_CYGWIN_3_0_4_B1 qt-3=20
$ cd qt-3=20
$ cvs update -jqt_3_0_4 -jqt_3_1_0_rc1 qt-3=20
I think you only need to compile qmake and create a Makefile from a .pro =
file .
=20
Index: qmake/Makefile.unix
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/kde-cygwin/qt-3/qmake/Makefile.unix,v
retrieving revision 1.1.1.3
diff -u -3 -p -B -b -B -r1.1.1.3 Makefile.unix
--- qmake/Makefile.unix 13 Nov 2002 14:52:14 -0000 1.1.1.3
+++ qmake/Makefile.unix 16 Nov 2002 00:46:08 -0000
@@ -16,15 +16,16 @@ CFLAGS=3D @QMAKE_CFLAGS@ \
-DQT_NO_TEXTCODEC -DQT_LITE_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS =
-I@QMAKESPEC@
CXXFLAGS=3D $(CFLAGS)
LFLAGS=3D@QMAKE_LFLAGS@
+EXEEXT=3D.exe
=20
-qmake: $(OBJS) $(QOBJS)
+qmake$(EXEEXT): $(OBJS) $(QOBJS)
$(CXX) -o $@ $(OBJS) $(QOBJS) $(LFLAGS)
- rm -f @BUILD_PATH@/bin/$@
- ln -s ../qmake/$@ @BUILD_PATH@/bin/$@
+ rm -f @BUILD_PATH@/bin/$@$(EXEEXT)
+ ln -s ../qmake/$@$(EXEEXT) @BUILD_PATH@/bin/$@$(EXEEXT)
=20
install: qmake
[ -d @QT_INSTALL_BINS@ ] || mkdir -p @QT_INSTALL_BINS@
- -cp -f @BUILD_PATH@/bin/qmake @QT_INSTALL_BINS@
+ -cp -f @BUILD_PATH@/bin/qmake$(EXEEXT) @QT_INSTALL_BINS@
[ -d @QT_INSTALL_DATA@ ] || mkdir -p @QT_INSTALL_DATA@
-cp -r -f @SOURCE_PATH@/mkspecs @QT_INSTALL_DATA@
=20
Index: qmake/generators/unix/unixmake2.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/kde-cygwin/qt-3/qmake/generators/unix/unixmake2.cpp,v
retrieving revision 1.1.1.3
diff -u -3 -p -B -b -B -r1.1.1.3 unixmake2.cpp
--- qmake/generators/unix/unixmake2.cpp 13 Nov 2002 14:52:16 -0000 =
1.1.1.3
+++ qmake/generators/unix/unixmake2.cpp 16 Nov 2002 00:46:27 -0000
@@ -35,6 +35,13 @@
**
**********************************************************************/
=20
+/* cygwin notes=20
+ =20
+ TARGET - absolute path for shared library=20
+ TARGETA - absolute path for static library=20
+ TARGET0 - absolute path for shared import library=20
+*/
+
#include "unixmake.h"
#include "option.h"
#include <qregexp.h>
@@ -215,7 +222,12 @@ UnixMakefileGenerator::writeMakeParts(QT
t << "DESTDIR =3D " << var("DESTDIR") << endl;
t << "TARGET =3D " << var("TARGET") << endl;
if(project->isActiveConfig("plugin") ) {
+ if ( project->isEmpty("QMAKE_CYGWIN_SHLIB")) {
t << "TARGETD =3D " << var("TARGET") << endl;
+ } else {
+ t << "TARGETA =3D " << var("TARGET_.a") << endl;
+ t << "TARGET0 =3D " << var("TARGET_.dll.a") << endl;
+ }
} else if (!project->isActiveConfig("staticlib") && =
project->variables()["QMAKE_APP_FLAG"].isEmpty()) {
t << "TARGETA =3D " << var("TARGETA") << endl;
if (project->isEmpty("QMAKE_HPUX_SHLIB")) {
@@ -473,9 +485,12 @@ UnixMakefileGenerator::writeMakeParts(QT
t << "\n\t"
<< "-$(DEL_FILE) $(TARGET)" << "\n\t"
<< var("QMAKE_LINK_SHLIB_CMD");
+
+ if (!project->isEmpty("QMAKE_CYGWIN_SHLIB")) {
if(!destdir.isEmpty())
t << "\n\t"
<< "-$(MOVE) $(TARGET) " << var("DESTDIR");
+ }
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK") << "\n\t";
t << endl << endl;
@@ -483,6 +498,7 @@ UnixMakefileGenerator::writeMakeParts(QT
t << "\n\t"
<< "-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)" << =
"\n\t"
<< var("QMAKE_LINK_SHLIB_CMD") << "\n\t";
+ if (project->isEmpty("QMAKE_CYGWIN_SHLIB")) {
t << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET0)") << =
"\n\t"
<< varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET1)") << =
"\n\t"
<< varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET2)");
@@ -493,6 +509,7 @@ UnixMakefileGenerator::writeMakeParts(QT
<< "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET1)\n\t"
<< "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET2)\n\t"
<< "-$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) " << =
var("DESTDIR");
+ }
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << endl << endl;
@@ -501,11 +518,13 @@ UnixMakefileGenerator::writeMakeParts(QT
<< "-$(DEL_FILE) $(TARGET) $(TARGET0)" << "\n\t"
<< var("QMAKE_LINK_SHLIB_CMD") << "\n\t";
t << varGlue("QMAKE_LN_SHLIB",""," "," $(TARGET) $(TARGET0)");
+ if (project->isEmpty("QMAKE_CYGWIN_SHLIB")) {
if(!destdir.isEmpty())
t << "\n\t"
<< "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET)\n\t"
<< "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET0)\n\t"
<< "-$(MOVE) $(TARGET) $(TARGET0) " << var("DESTDIR");
+ }=20
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << endl << endl;
@@ -707,15 +726,23 @@ UnixMakefileGenerator::writeMakeParts(QT
if(!destdir.isEmpty() && destdir.right(1) !=3D Option::dir_sep)
destdir +=3D Option::dir_sep;
t << "distclean: " << "clean\n";
+ if (!project->isEmpty("QMAKE_CYGWIN_SHLIB")) {
+ t << "\t-$(DEL_FILE) " << destdir << "$(TARGET) $(TARGET0) \n\t";
+ } else {
if(project->first("TEMPLATE") =3D=3D "app" &&
project->isActiveConfig("resource_fork") && =
!project->isActiveConfig("console"))
t << "\t-$(DEL_FILE) -r " << destdir.section(Option::dir_sep, 0, -4) =
<< "\n";
else
t << "\t-$(DEL_FILE) " << destdir << "$(TARGET)" << " " << "$(TARGET)" =
<< "\n";
+ }
if(!project->isActiveConfig("staticlib") && =
project->variables()["QMAKE_APP_FLAG"].isEmpty() &&
!project->isActiveConfig("plugin"))
+ if (!project->isEmpty("QMAKE_CYGWIN_SHLIB")) {
+ t << "\t-$(DEL_FILE) " << destdir << "$(TARGETA)\n\t";
+ } else {
t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << =
"$(TARGET1) "
<< destdir << "$(TARGET2) $(TARGETA)" << "\n";
+ }
t << endl << endl;
=20
if ( !project->isEmpty("PRECOMPH") ) {
@@ -918,6 +945,13 @@ void UnixMakefileGenerator::init2()
else
project->variables()["QMAKE_AR_CMD"].append("$(AR) $(TARGETA) =
$(OBJECTS) $(OBJMOC)");
if( project->isActiveConfig("plugin") ) {
+
+ if ( !project->isEmpty("QMAKE_CYGWIN_SHLIB")) {
+ project->variables()["TARGET_"].append(project->first("DESTDIR") + =
project->first("TARGET") + "-" + project->first("VER_MAJ") + "." + =
project->first("QMAKE_EXTENSION_SHLIB"));
+ =
project->variables()["TARGET_.dll.a"].append(project->first("DESTDIR") + =
"lib" + project->first("TARGET") + ".dll.a");
+ project->variables()["TARGET_.a"].append(project->first("DESTDIR") =
+ "lib" + project->first("TARGET") + ".a");
+ project->variables()["TARGET"] =3D project->variables()["TARGET_"];
+ } else {=20
project->variables()["TARGET_x.y.z"].append("lib" +
project->first("TARGET") + "." + =
project->first("QMAKE_EXTENSION_SHLIB"));
if(project->isActiveConfig("lib_version_first"))
@@ -930,6 +964,8 @@ void UnixMakefileGenerator::init2()
"." + project->first("VER_MAJ"));
=20
project->variables()["TARGET"] =3D =
project->variables()["TARGET_x.y.z"];
+ }=20
+
if(project->isActiveConfig("qt"))
project->variables()["DEFINES"].append("QT_PLUGIN");
} else if ( !project->isEmpty("QMAKE_HPUX_SHLIB") ) {
@@ -972,6 +1008,16 @@ void UnixMakefileGenerator::init2()
}
project->variables()["TARGET"] =3D =
project->variables()["TARGET_x.y.z"];
} else {
+
+ if (!project->isEmpty("QMAKE_CYGWIN_SHLIB")) {
+ if(project->isActiveConfig("dll") && =
project->variables()["DLLDESTDIR"].isEmpty())=20
+ =
project->variables()["DLLDESTDIR"].append(project->first("DESTDIR") + =
"../bin");
+
+ =
project->variables()["TARGET_"].append(project->first("DLLDESTDIR") + =
"/" + project->first("TARGET") + "-" + project->first("VER_MAJ") + "." + =
project->first("QMAKE_EXTENSION_SHLIB"));
+ =
project->variables()["TARGET_.dll.a"].append(project->first("DESTDIR") + =
"lib" + project->first("TARGET") + ".dll.a");
+ =
project->variables()["TARGET_.a"].append(project->first("DESTDIR") + =
"lib" + project->first("TARGET") + ".a");
+ project->variables()["TARGET"] =3D =
project->variables()["TARGET_"];
+ } else {
project->variables()["TARGET_"].append("lib" + =
project->first("TARGET") + "." +
project->first("QMAKE_EXTENSION_SHLIB"));
if(project->isActiveConfig("lib_version_first")) {
@@ -1004,6 +1050,7 @@ void UnixMakefileGenerator::init2()
project->first("VER_PAT"));
}
project->variables()["TARGET"] =3D =
project->variables()["TARGET_x.y.z"];
+ }
}
if(project->isEmpty("QMAKE_LN_SHLIB"))
project->variables()["QMAKE_LN_SHLIB"].append("ln -s");
------=_NextPart_000_0128_01C28EED.BF4A8300
Content-Type: application/octet-stream;
name="BUGS.cygwin"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="BUGS.cygwin"
src/kernel/qt_windows.h missing (got from qt 2.3.0 non commercial)=20
links fehlen=20
$ ln -s ../src/tools/qmutexpool_p.h ../include/private/qmutexpool_p.h
ln -s ../../src/sql/qsqlextension_p.h qsqlextension_p.h
=20
src/moc=20
- byacc statt bison verwenden=20
$ make
make[1]: Entering directory =
`/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3'
cd qmake && make
make[2]: Entering directory =
`/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/qmake'
g++ -c -o qdir_unix.o -I. -Igenerators -Igenerators/unix =
-Igenerators/win32 -Igenerators/mac =
-I/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/include/q
make -I/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/include =
-I/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/include =
-DQT_NO_TEXTCODEC -DQT_NO_COMPONE
NT -DQT_NO_STL -DQT_NO_COMPRESS =
-I/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/mkspecs/cygwin-g++ =
/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/src/t
ools/qdir_unix.cpp
g++ -o qmake project.o main.o makefile.o unixmake2.o unixmake.o =
borland_bmake.o msvc_nmake.o msvc_dsp.o msvc_vcproj.o option.o =
winmakefile.o projectge
nerator.o metrowerks_xml.o pbuilder_pbx.o msvc_objectmodel.o qstring.o =
qtextstream.o qiodevice.o qglobal.o qgdict.o qcstring.o qdatastream.o =
qgarray.o
qbuffer.o qglist.o qptrcollection.o qfile.o qfile_unix.o qregexp.o =
qgvector.o qgcache.o qbitarray.o qdir.o quuid.o qfileinfo_unix.o =
qdir_unix.o qfile
info.o qdatetime.o qstringlist.o qmap.o qconfig.o
rm -f /home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/bin/qmake
ln -s /home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/qmake/qmake =
/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/bin/qmake
ln: `/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/bin/qmake': File =
exists
make[2]: *** [qmake] Error 1
make[2]: Leaving directory =
`/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/qmake'
make[1]: *** [src-qmake] Error 2
make[1]: Leaving directory =
`/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3'
make: *** [init] Error 2
make[2]: Entering directory =
`/home/habacker/src/cvs.kde-cygwin.sf.net/qt-3/src/moc'
qmake moc.pro
WARNING: target.path is not defined: install target not created
------=_NextPart_000_0128_01C28EED.BF4A8300--