From a45b064645cda7d0dfe8fa55f3e9e16859bee5c5 Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 2 Mar 2010 11:29:15 +0100 Subject: Reversed order of user QMAKE_POST_LINK statements and generated ones. Otherwise the users' statements would run before the binary was fully linked. --- .../linux-armcc/features/symbian_building.prf | 36 +++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 67b3075..ef8e4e6 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -85,10 +85,22 @@ isEmpty(capability): capability = "None" capability = "--capability=$$capability" contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { - !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += && - QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym + !isEmpty(QMAKE_POST_LINK) { + # No way to honor the '@' :-( + QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "") + QMAKE_POST_LINK = && $$QMAKE_POST_LINK + } # the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error - QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --fpu=softvfp --targettype=DLL --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.dll --dso=$$symbianDestdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log + QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym \ + && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 \ + --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 \ + --stack=0x00014000 --fpu=softvfp --targettype=DLL \ + --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.dll \ + --dso=$$symbianDestdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \ + --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ + --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ + | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ + $$QMAKE_POST_LINK QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def @@ -99,11 +111,21 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { } contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { - !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += && - - QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym + !isEmpty(QMAKE_POST_LINK) { + # No way to honor the '@' :-( + QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "") + QMAKE_POST_LINK = && $$QMAKE_POST_LINK + } # the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error - QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --fpu=softvfp --targettype=EXE --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log + QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym \ + && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a \ + --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 \ + --stack=0x00014000 --fpu=softvfp --targettype=EXE \ + --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe \ + --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \ + --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ + | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ + $$QMAKE_POST_LINK QMAKE_POST_LINK += && ln "$${TARGET}.exe" "$$TARGET" QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe -- cgit v0.12 From bdff51768dfe7953324102ccaaca64da927c6b98 Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 2 Mar 2010 10:57:10 +0100 Subject: Added dso dependencies to Symbian targets. This is required for correct intermodule building when def files are off, since otherwise the ordinals present in the DLLs and the ordinals linked to may be different. In layman's terms: If you build QtCore, QtGui will also trigger rebuilding as a result of that. --- .../linux-armcc/features/symbian_building.prf | 25 +++++++++++----------- qmake/generators/unix/unixmake2.cpp | 4 ++++ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index ef8e4e6..795d055 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -14,27 +14,28 @@ contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb") { DEFINES += __MARM_THUMB__ } -for(libraries, LIBS) { - libraries = $$replace(libraries, "\.dll$", ".dso") - isFullName = $$find(libraries, \.) +defineReplace(processSymbianLibraries) { + library = $$replace(1, "\.dll$", ".dso") + isFullName = $$find(library, \.) isEmpty(isFullName) { - newLIBS += "$${libraries}.dso" + newLIB = "$${library}.dso" } else { - newLIBS += "$${libraries}" + newLIB = "$${library}" } + return($$newLIB) +} + +for(libraries, LIBS) { + newLIBS += $$processSymbianLibraries($$libraries) } LIBS = $$newLIBS +PRE_TARGETDEPS += $$replace(newLIBS, "-l", "") newLIBS = for(libraries, QMAKE_LIBS) { - libraries = $$replace(libraries, "\.dll$", ".dso") - isFullName = $$find(libraries, \.) - isEmpty(isFullName) { - newLIBS += "$${libraries}.dso" - } else { - newLIBS += "$${libraries}" - } + newLIBS += $$processSymbianLibraries($$libraries) } QMAKE_LIBS = $$newLIBS +PRE_TARGETDEPS += $$replace(newLIBS, "-l", "") # This needs to be done after the above LIBS mangling. include(../platformlibs.conf) diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 6516786..cff0138 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -177,6 +177,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(!project->isEmpty("QMAKE_MACOSX_DEPLOYMENT_TARGET")) t << "export MACOSX_DEPLOYMENT_TARGET = " //exported to children processes << project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET") << endl; + + if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) + t << "vpath %.dso " << project->values("QMAKE_LIBDIR").join(":") << endl; + t << endl; t << "####### Output directory" << endl << endl; -- cgit v0.12 From 34898eaa384684c74786cd59fc322054c8888c51 Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 2 Mar 2010 13:16:55 +0100 Subject: Enabled conditional updating of dso files. This saves rebuilding of components that depend on the current one, by not updating the dso file unless it has changed. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 795d055..dab2fbf 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -91,19 +91,26 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "") QMAKE_POST_LINK = && $$QMAKE_POST_LINK } - # the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error + # The tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error. + # The comparison of dso files is to avoid extra building of modules that depend on this dso, in + # case it has not changed. QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym \ && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 \ --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 \ --stack=0x00014000 --fpu=softvfp --targettype=DLL \ --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.dll \ - --dso=$$symbianDestdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \ + --dso=$$symbianObjdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \ --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ + && if ! diff -q $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso \ + > /dev/null 2>&1; then \ + $$QMAKE_COPY $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso; \ + fi \ $$QMAKE_POST_LINK QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso + QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.dso QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) -- cgit v0.12 From 1a289e35cffc55b341a7c4894a26c1693a575f98 Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 8 Mar 2010 16:53:35 +0100 Subject: Added Symbian def file support to Linux build system. This also switches the official def file variable in qmake profiles to DEF_FILE. Support for freezing def files was also added, but needs more work and is therefore disabled for now. Task: QTBUG-7510 Task: QTBUG-8052 --- configure | 29 ++++++- doc/src/development/qmake-manual.qdoc | 8 +- mkspecs/common/symbian/symbian-makefile.conf | 1 + mkspecs/features/symbian/def_files.prf | 95 ++++++++++++++++------ .../linux-armcc/features/symbian_building.prf | 2 + src/qbase.pri | 2 +- src/tools/bootstrap/bootstrap.pri | 6 +- src/tools/bootstrap/bootstrap.pro | 6 +- 8 files changed, 116 insertions(+), 33 deletions(-) diff --git a/configure b/configure index cf8ed13..b6ba1e8 100755 --- a/configure +++ b/configure @@ -644,6 +644,7 @@ CFG_XVIDEO=auto CFG_XINERAMA=runtime CFG_XFIXES=runtime CFG_ZLIB=auto +CFG_SYMBIAN_DEFFILES=auto CFG_S60=auto CFG_SQLITE=qt CFG_GIF=auto @@ -927,7 +928,7 @@ while [ "$#" -gt 0 ]; do VAL=no ;; #Qt style yes options - -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-mediaservice|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60) + -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-mediaservice|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL=yes ;; @@ -1660,6 +1661,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + usedeffiles) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_SYMBIAN_DEFFILES="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; sqlite) if [ "$VAL" = "system" ]; then CFG_SQLITE=system @@ -3343,7 +3351,7 @@ Usage: $relconf [-h] [-prefix ] [-prefix-install] [-bindir ] [-libdir [-no-openssl] [-openssl] [-openssl-linked] [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit] [-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative] - [-no-s60] [-s60] + [-no-s60] [-s60] [-no-usedeffiles] [-usedeffiles] [additional platform specific options (see below)] @@ -3529,6 +3537,8 @@ cat << EOF -no-s60 ............ Do not compile in S60 support. + -s60 ............... Compile with support for the S60 UI Framework. + -no-usedeffiles .... Disable the usage of DEF files. + + -usedeffiles ....... Enable the usage of DEF files. -no-mmx ............ Do not compile with use of MMX instructions. -no-3dnow .......... Do not compile with use of 3DNOW instructions. @@ -4625,6 +4635,14 @@ if [ "$CFG_S60" = "auto" ]; then fi fi +if [ "$CFG_SYMBIAN_DEFFILES" = "auto" ]; then + if echo "$XQMAKESPEC" | grep symbian > /dev/null && [ "$CFG_DEV" = "no" ]; then + CFG_SYMBIAN_DEFFILES=yes + else + CFG_SYMBIAN_DEFFILES=no + fi +fi + # detect how jpeg should be built if [ "$CFG_JPEG" = "auto" ]; then if [ "$CFG_SHARED" = "yes" ]; then @@ -6358,6 +6376,12 @@ if [ "$CFG_S60" = "yes" ]; then QT_CONFIG="$QT_CONFIG s60" fi +if [ "$CFG_SYMBIAN_DEFFILES" = "yes" ]; then + QMAKE_CONFIG="$QMAKE_CONFIG def_files" +else + QMAKE_CONFIG="$QMAKE_CONFIG def_files_disabled" +fi + [ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis" [ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups" [ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv" @@ -7584,6 +7608,7 @@ if [ "$CFG_WEBKIT" = "yes" ]; then fi echo "Declarative module ..... $CFG_DECLARATIVE" echo "Support for S60 ........ $CFG_S60" +echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES" echo "STL support ............ $CFG_STL" echo "PCH support ............ $CFG_PRECOMPILE" echo "MMX/3DNOW/SSE/SSE2...... ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}" diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index a960382..c314eb8 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -1329,9 +1329,13 @@ \target DEF_FILE \section1 DEF_FILE - \e {This is only used on Windows when using the \c app template}. + \e {This is only used on Windows when using the \c app template, + and on Symbian when building a shared DLL}. - Specifies a \c .def file to be included in the project. + Specifies a \c .def file to be included in the project. On Symbian + a directory may be specified instead, in which case the real files + will be located under the standard Symbian directories \c bwins and + \c eabi. \target DEPENDPATH \section1 DEPENDPATH diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index c8a88dd..13b335a 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -22,6 +22,7 @@ QMAKE_CFLAGS_DEBUG += -g QMAKE_CXXFLAGS_DEBUG += -g QMAKE_CFLAGS_RELEASE += -O2 -Otime QMAKE_CXXFLAGS_RELEASE += -O2 -Otime +QMAKE_ELF2E32_FLAGS += DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __MARM_INTERWORK__ __DLL__ _UNICODE __SUPPORT_CPP_EXCEPTIONS__ diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf index 48d91aa..a1f0c8d 100644 --- a/mkspecs/features/symbian/def_files.prf +++ b/mkspecs/features/symbian/def_files.prf @@ -3,32 +3,75 @@ CONFIG -= def_files_disabled -# Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one -# (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements -# in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword) -!contains(MMP_RULES, defBlock) { - # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files - # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE - # statements - they use the qmake generated statements instead - # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage - !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): { - !isEmpty(defFilePath) { - defBlock = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \ - "$${LITERAL_HASH}endif" - } else { - # If defFilePath is not defined, then put the folders containing the DEF files at the - # same level as the .pro (and generated MMP) file(s) - defBlock = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE ./bwins/$${TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE ./eabi/$${TARGET}.def" \ - "$${LITERAL_HASH}endif" +symbian-abld|symbian-sbsv2 { + # Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one + # (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements + # in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword) + !contains(MMP_RULES, defBlock) { + # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files + # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE + # statements - they use the qmake generated statements instead + # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage + !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): { + !isEmpty(DEF_FILE) { + defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE $$DEF_FILE/bwins/$${TARGET}.def" \ + "$${LITERAL_HASH}elif defined EABI" \ + "DEFFILE $$DEF_FILE/eabi/$${TARGET}.def" \ + "$${LITERAL_HASH}endif" + } else:!isEmpty(defFilePath) { + defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \ + "$${LITERAL_HASH}elif defined EABI" \ + "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \ + "$${LITERAL_HASH}endif" + } else { + # If defFilePath is not defined, then put the folders containing the DEF files at the + # same level as the .pro (and generated MMP) file(s) + defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE ./bwins/$${TARGET}.def" \ + "$${LITERAL_HASH}elif defined EABI" \ + "DEFFILE ./eabi/$${TARGET}.def" \ + "$${LITERAL_HASH}endif" + } + MMP_RULES += defBlock } - MMP_RULES += defBlock } + +} else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { + !isEmpty(DEF_FILE) { + defFile = $$DEF_FILE + } else { + defFile = . + } + system("$$QMAKE_CHK_DIR_EXISTS $$_PRO_FILE_PWD_/$$defFile") { + !exists("$$_PRO_FILE_PWD_/$$defFile/eabi") { + system("$$QMAKE_MKDIR $$_PRO_FILE_PWD_/$$defFile/eabi") + } + elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(TARGET)u.def + } else { + elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile + } + QMAKE_ELF2E32_FLAGS += "`test -e $$elf2e32FileToAdd && echo --definput=$$elf2e32FileToAdd`" + + symbianObjdir = $$OBJECTS_DIR + isEmpty(symbianObjdir):symbianObjdir = . + + freeze_target.target = freeze + freeze_target.depends = first + # The perl part is to convert to unix line endings and remove comments, which the s60 tools refuse to do. + freeze_target.commands = perl -n -e \'next if (/; NEW/); s/\r//g; if (/MISSING:(.*)/x) { print(\"\$\$1 ABSENT\\n\"); } else { print; }\' < $$symbianObjdir/$${TARGET}.def > $$elf2e32FileToAdd + #QMAKE_EXTRA_TARGETS += freeze_target +} else:contains(TEMPLATE, subdirs) { + freeze_target.target = freeze + freeze_target.CONFIG = recursive + freeze_target.recurse = $$SUBDIRS + #QMAKE_EXTRA_TARGETS += freeze_target +} else { + freeze_target.target = freeze + freeze_target.commands = + #QMAKE_EXTRA_TARGETS += freeze_target } diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index dab2fbf..12ca516 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -102,6 +102,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { --dso=$$symbianObjdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \ --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ + $$QMAKE_ELF2E32_FLAGS \ | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ && if ! diff -q $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso \ > /dev/null 2>&1; then \ @@ -132,6 +133,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe \ --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \ --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ + $$QMAKE_ELF2E32_FLAGS \ | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ $$QMAKE_POST_LINK QMAKE_POST_LINK += && ln "$${TARGET}.exe" "$$TARGET" diff --git a/src/qbase.pri b/src/qbase.pri index 835ed0e..4a75565 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -104,7 +104,7 @@ symbian { # built in this exact environment. *Never* use this when building a version # for release. contains(CONFIG, def_files) { - defFilePath=../s60installs + DEF_FILE=../s60installs } } load(armcc_warnings) diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index c5e1e1c..15e746a 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -62,8 +62,12 @@ mac { LIBS += -framework CoreServices } -# Make dummy "sis" target to keep recursive "make sis" working. +# Make dummy "sis" and "freeze" target to keep recursive "make sis/freeze" working. sis_target.target = sis sis_target.commands = sis_target.depends = first QMAKE_EXTRA_TARGETS += sis_target +freeze_target.target = freeze +freeze_target.commands = +freeze_target.depends = first +QMAKE_EXTRA_TARGETS += freeze_target diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index d211f47..48dc444 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -114,8 +114,12 @@ contains(QT_CONFIG, zlib) { lib.CONFIG = dummy_install INSTALLS += lib -# Make dummy "sis" target to keep recursive "make sis" working. +# Make dummy "sis" and "freeze" target to keep recursive "make sis/freeze" working. sis_target.target = sis sis_target.commands = sis_target.depends = first QMAKE_EXTRA_TARGETS += sis_target +freeze_target.target = freeze +freeze_target.commands = +freeze_target.depends = first +QMAKE_EXTRA_TARGETS += freeze_target -- cgit v0.12 From 16113ecd5135aea01aac1fa3954143e59269bd50 Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 8 Mar 2010 16:57:33 +0100 Subject: Switched to using DEF_FILE, which is the official variable. --- src/3rdparty/webkit/WebCore/WebCore.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index c7e5655..22bd762 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -3418,7 +3418,7 @@ CONFIG(QTDIR_build):isEqual(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4 symbian { shared { contains(CONFIG, def_files) { - defFilePath=../WebKit/qt/symbian + DEF_FILE=../WebKit/qt/symbian } } } -- cgit v0.12