From 8e74d136fee52af8c1cc2477618934a5e5be7cc7 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 22 Jan 2013 21:00:57 +0100 Subject: purge vestiges of QMAKE_LFLAGS_QT_DLL Change-Id: Ia86b9cee1044ab915854e0e231e1b3d5d66e1f7d Reviewed-by: Joerg Bornemann --- qmake/generators/win32/msvc_vcproj.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index b082fcb307..fce2147ed5 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1060,10 +1060,6 @@ void VcprojGenerator::initLinkerTool() conf.linker.OutputFile = "$(OutDir)\\"; conf.linker.OutputFile += project->first("MSVCPROJ_TARGET").toQString(); - - if(project->isActiveConfig("dll")){ - conf.linker.parseOptions(project->values("QMAKE_LFLAGS_QT_DLL")); - } } void VcprojGenerator::initResourceTool() -- cgit v1.2.3 From 4dd29248cd43ff730f7432b51a443b72fad3523d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 15 Feb 2013 12:24:22 +0100 Subject: Update feature paths on assignment to QMAKE_PLATFORM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of after parsing the makespecs, were we assumed QMAKE_PLATFORM had been set by the makespec and did an explicit update. Allows loading platform specific features from within a makespec after updating QMAKE_PLATFORM. Change-Id: I0eb3b7fb88ce48b00a384850c5d87223c06234d7 Reviewed-by: Tor Arne Vestbø --- qmake/library/qmakeevaluator.cpp | 4 +++- qmake/library/qmakeevaluator_p.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'qmake') diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index ac08acee99..1904b5136c 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -126,6 +126,7 @@ void QMakeEvaluator::initStatics() statics.strforever = QLatin1String("forever"); statics.strhost_build = QLatin1String("host_build"); statics.strTEMPLATE = ProKey("TEMPLATE"); + statics.strQMAKE_PLATFORM = ProKey("QMAKE_PLATFORM"); #ifdef PROEVALUATOR_FULL statics.strREQUIRES = ProKey("REQUIRES"); #endif @@ -924,6 +925,8 @@ void QMakeEvaluator::visitProVariable( if (varName == statics.strTEMPLATE) setTemplate(); + else if (varName == statics.strQMAKE_PLATFORM) + updateFeaturePaths(); #ifdef PROEVALUATOR_FULL else if (varName == statics.strREQUIRES) checkRequirements(values(varName)); @@ -1217,7 +1220,6 @@ bool QMakeEvaluator::loadSpec() } if (!loadSpecInternal()) return false; - updateFeaturePaths(); // The spec extends the feature search path, so rebuild the cache. if (!m_conffile.isEmpty() && evaluateFile(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) { return false; diff --git a/qmake/library/qmakeevaluator_p.h b/qmake/library/qmakeevaluator_p.h index 9830496424..935f112f52 100644 --- a/qmake/library/qmakeevaluator_p.h +++ b/qmake/library/qmakeevaluator_p.h @@ -89,6 +89,7 @@ struct QMakeStatics { QString strforever; QString strhost_build; ProKey strTEMPLATE; + ProKey strQMAKE_PLATFORM; #ifdef PROEVALUATOR_FULL ProKey strREQUIRES; #endif -- cgit v1.2.3 From 1a0924dfc008b60b98bc921a3e64c3a920158b60 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 2 Feb 2013 12:31:53 +0000 Subject: Unify win32-g++ and Unix qmake Makefiles. Replace the old sed / template @FOO@ method with echo. Enable MSYS bash to build qmake.exe Use qmake/Makefile.unix for all win32-g++ builds. Change-Id: I6e27d69b28d27131838bbbb3a4ee5a08b470f31b Reviewed-by: Oswald Buddenhagen --- qmake/Makefile.unix | 76 ++++++++++++++-------- qmake/Makefile.win32 | 6 +- qmake/Makefile.win32-g++ | 160 ----------------------------------------------- 3 files changed, 50 insertions(+), 192 deletions(-) delete mode 100644 qmake/Makefile.win32-g++ (limited to 'qmake') diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index c8ac221293..e4bb27c557 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -1,11 +1,3 @@ -SOURCE_PATH = @SOURCE_PATH@ -BUILD_PATH = @BUILD_PATH@ -QT_VERSION = @QT_VERSION@ -QTOBJS = @QMAKE_QTOBJS@ -QTSRCS = @QMAKE_QTSRCS@ -QMAKESPEC = @QMAKESPEC@ -LFLAGS = @QMAKE_LFLAGS@ - QMKSRC = $(SOURCE_PATH)/qmake QMKLIBSRC = $(QMKSRC)/library QMKGENSRC = $(QMKSRC)/generators @@ -22,18 +14,14 @@ OBJS=project.o option.o property.o main.o ioutils.o proitems.o \ #qt code QOBJS=qtextcodec.o qutfcodec.o qstring.o qstringbuilder.o qtextstream.o qiodevice.o qmalloc.o qglobal.o \ qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o \ - qfilesystementry.o qfilesystemengine_unix.o qfilesystemengine.o qfilesystemiterator_unix.o \ - qfsfileengine_unix.o qfsfileengine.o \ - qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o \ - qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o \ - qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o \ - qlocale.o qlocale_tools.o qlocale_unix.o qlinkedlist.o qnumeric.o qcryptographichash.o \ - qxmlstream.o qxmlutils.o qlogging.o \ + qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o \ + qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o \ + qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o \ + qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.o qnumeric.o \ + qcryptographichash.o qxmlstream.o qxmlutils.o qlogging.o \ $(QTOBJS) - - #all sources, used for the depend target DEPEND_SRC = \ $(QMKSRC)/main.cpp $(QMKSRC)/project.cpp $(QMKSRC)/option.cpp $(QMKSRC)/property.cpp \ @@ -58,10 +46,16 @@ DEPEND_SRC = \ $(SOURCE_PATH)/src/corelib/tools/qarraydata.cpp $(SOURCE_PATH)/src/corelib/tools/qbytearray.cpp\ $(SOURCE_PATH)/src/corelib/tools/qbytearraymatcher.cpp \ $(SOURCE_PATH)/src/corelib/io/qdatastream.cpp $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp \ - $(SOURCE_PATH)/src/corelib/io/qfilesystementry.cpp $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp \ + $(SOURCE_PATH)/src/corelib/io/qfilesystementry.cpp \ + $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp \ $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_mac.cpp \ - $(SOURCE_PATH)/src/corelib/io/qfilesystemengine.cpp $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp \ - $(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp $(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp \ + $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_win.cpp \ + $(SOURCE_PATH)/src/corelib/io/qfilesystemengine.cpp \ + $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp \ + $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_win.cpp \ + $(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp \ + $(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp \ + $(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp \ $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.cpp \ $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp $(SOURCE_PATH)/src/corelib/tools/qlist.cpp \ $(SOURCE_PATH)/src/corelib/tools/qvector.cpp $(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp \ @@ -74,6 +68,7 @@ DEPEND_SRC = \ $(SOURCE_PATH)/src/corelib/tools/qlocale.cpp \ $(SOURCE_PATH)/src/corelib/tools/qlocale_tools.cpp \ $(SOURCE_PATH)/src/corelib/tools/qlocale_unix.cpp \ + $(SOURCE_PATH)/src/corelib/tools/qlocale_win.cpp \ $(SOURCE_PATH)/src/corelib/tools/qlinkedlist.cpp \ $(SOURCE_PATH)/src/corelib/tools/qhash.cpp $(SOURCE_PATH)/src/corelib/kernel/qcore_mac.cpp \ $(SOURCE_PATH)/src/corelib/io/qtemporaryfile.cpp $(SOURCE_PATH)/src/corelib/kernel/qmetatype.cpp \ @@ -84,9 +79,11 @@ DEPEND_SRC = \ $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp \ $(SOURCE_PATH)/src/corelib/kernel/qsystemerror.cpp \ $(SOURCE_PATH)/src/corelib/global/qlogging.cpp \ + $(SOURCE_PATH)/src/corelib/plugin/qsystemlibrary.cpp \ + $(SOURCE_PATH)/tools/shared/windows/registry.cpp \ $(QTSRCS) -CPPFLAGS = -g $(OPENSOURCE_CXXFLAGS) \ +CPPFLAGS = -g $(EXTRA_CPPFLAGS) \ -I$(QMKSRC) -I$(QMKLIBSRC) -I$(QMKSRC)/generators -I$(QMKSRC)/generators/unix -I$(QMKSRC)/generators/win32 \ -I$(QMKSRC)/generators/mac -I$(QMKSRC)/generators/integrity \ -I$(BUILD_PATH)/include -I$(BUILD_PATH)/include/QtCore \ @@ -98,19 +95,23 @@ CPPFLAGS = -g $(OPENSOURCE_CXXFLAGS) \ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \ -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -CXXFLAGS = @QMAKE_CXXFLAGS@ $(CPPFLAGS) +CXXFLAGS = $(EXTRA_CXXFLAGS) $(CPPFLAGS) -first all: $(BUILD_PATH)/bin/qmake -qmake: $(BUILD_PATH)/bin/qmake +first all: $(BUILD_PATH)/bin/qmake$(EXEEXT) +qmake: $(BUILD_PATH)/bin/qmake$(EXEEXT) -$(BUILD_PATH)/bin/qmake: $(OBJS) $(QOBJS) +$(BUILD_PATH)/bin/qmake$(EXEEXT): $(OBJS) $(QOBJS) $(CXX) -o "$@" $(OBJS) $(QOBJS) $(LFLAGS) +Makefile: $(SOURCE_PATH)/qmake/Makefile.unix + @echo "Out of date, please rerun configure" + clean:: - rm -f $(OBJS) $(QOBJS) + $(RM_F) $(OBJS) $(QOBJS) distclean:: clean - rm -rf $(BUILD_PATH)/bin/qmake .deps + $(RM_RF) .deps + $(RM_F) $(BUILD_PATH)/bin/qmake$(EXEEXT) depend: makedepend -D__MAKEDEPEND__ $(CPPFLAGS) $(DEPEND_SRC) @@ -222,6 +223,9 @@ qnumeric.o: $(SOURCE_PATH)/src/corelib/global/qnumeric.cpp qsettings_mac.o: $(SOURCE_PATH)/src/corelib/io/qsettings_mac.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qsettings_mac.cpp +qsettings_win.o: $(SOURCE_PATH)/src/corelib/io/qsettings_win.cpp + $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qsettings_win.cpp + qiodevice.o: $(SOURCE_PATH)/src/corelib/io/qiodevice.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qiodevice.cpp @@ -270,6 +274,9 @@ qlocale_tools.o: $(SOURCE_PATH)/src/corelib/tools/qlocale_tools.cpp qlocale_unix.o: $(SOURCE_PATH)/src/corelib/tools/qlocale_unix.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlocale_unix.cpp +qlocale_win.o: $(SOURCE_PATH)/src/corelib/tools/qlocale_win.cpp + $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlocale_win.cpp + qdatastream.o: $(SOURCE_PATH)/src/corelib/io/qdatastream.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qdatastream.cpp @@ -297,9 +304,15 @@ qfilesystemengine_unix.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.c qfilesystemengine_mac.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_mac.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_mac.cpp +qfilesystemengine_win.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_win.cpp + $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_win.cpp + qfilesystemiterator_unix.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp +qfilesystemiterator_win.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_win.cpp + $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_win.cpp + qfsfileengine.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp @@ -309,6 +322,9 @@ qfsfileengine_iterator.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.c qfsfileengine_unix.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp +qfsfileengine_win.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp + $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp + qabstractfileengine.o: $(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp @@ -363,4 +379,10 @@ qxmlutils.o: $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp qlogging.o: $(SOURCE_PATH)/src/corelib/global/qlogging.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qlogging.cpp +qsystemlibrary.o: $(SOURCE_PATH)/src/corelib/plugin/qsystemlibrary.cpp + $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/plugin/qsystemlibrary.cpp + +registry.o: $(SOURCE_PATH)/tools/shared/windows/registry.cpp + $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/windows/registry.cpp + # DO NOT DELETE THIS LINE -- make depend depends on it diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 222acfa9a6..63cdf50563 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -42,7 +42,7 @@ CFLAGS_BARE = -c -Fo./ \ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \ -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ -DUNICODE -CFLAGS = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS) +CFLAGS = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS) $(EXTRA_CPPFLAGS) CXXFLAGS_BARE = $(CFLAGS_BARE) CXXFLAGS = $(CFLAGS) @@ -66,10 +66,6 @@ OBJS = project.obj main.obj ioutils.obj proitems.obj \ msvc_objectmodel.obj msbuild_objectmodel.obj registry.obj \ gbuild.obj cesdkhandler.obj -!IFDEF QMAKE_OPENSOURCE_EDITION -CFLAGS = $(CFLAGS) -DQMAKE_OPENSOURCE_EDITION -!ENDIF - #qt code QTOBJS= \ qbitarray.obj \ diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ deleted file mode 100644 index 565d5d2d51..0000000000 --- a/qmake/Makefile.win32-g++ +++ /dev/null @@ -1,160 +0,0 @@ -ifeq "$(SOURCE_PATH)" "" -SOURCE_PATH = .. -endif - -ifeq "$(BUILD_PATH)" "" -BUILD_PATH = .. -endif - -CORESRC = $(SOURCE_PATH)/src/corelib -TOOLSRC = $(SOURCE_PATH)/tools -QMKSRC = $(SOURCE_PATH)/qmake -QMKLIBSRC = $(QMKSRC)/library - -# SHELL is the full path of sh.exe, unless -# 1) it is found in the current directory -# 2) it is not found at all -# 3) it is overridden on the command line with an existing file -# ... otherwise it is always sh.exe. Specifically, SHELL from the -# environment has no effect. -# -# This check will fail if SHELL is explicitly set to a not -# sh-compatible shell. This is not a problem, because configure.exe -# will not do that. -ifeq ($(SHELL), sh.exe) - ifeq ($(wildcard $(CURDIR)/sh.exe), ) - SH = 0 - else - SH = 1 - endif -else - SH = 1 -endif - -ifeq ($(SH), 1) - COPY = cp - DEL = rm -f -else - COPY = copy - DEL = del /f -endif - -# -# specific stuff for mingw g++ make -# -CXX = g++ -CFLAGS = -c -o$@ -O \ - -I$(QMKSRC) -I$(QMKLIBSRC) -I$(QMKSRC)/generators -I$(QMKSRC)/generators/unix -I$(QMKSRC)/generators/win32 -I$(QMKSRC)/generators/mac -I$(QMKSRC)/generators/integrity \ - -I$(BUILD_PATH)/include -I$(BUILD_PATH)/include/QtCore -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION) -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION)/QtCore \ - -I$(BUILD_PATH)/src/corelib/global -DHAVE_QCONFIG_CPP \ - -I$(SOURCE_PATH)/mkspecs/win32-g++ \ - -I$(SOURCE_PATH)/tools/shared \ - -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DPROEVALUATOR_DEBUG \ - -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \ - -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ - -DUNICODE -CXXFLAGS = $(CFLAGS) -LFLAGS = -static -s -LIBS = -lole32 -luuid -ladvapi32 -lkernel32 -LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) -ADDCLEAN = - - -#qmake code -OBJS = project.o main.o ioutils.o proitems.o \ - qmakeglobals.o qmakeparser.o qmakeevaluator.o qmakebuiltins.o \ - makefile.o unixmake.o unixmake2.o mingw_make.o \ - option.o winmakefile.o projectgenerator.o property.o meta.o \ - makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \ - msvc_nmake.o msvc_vcproj.o msvc_vcxproj.o \ - msvc_objectmodel.o msbuild_objectmodel.o registry.o gbuild.o \ - cesdkhandler.o - -ifdef QMAKE_OPENSOURCE_EDITION -CFLAGS += -DQMAKE_OPENSOURCE_EDITION -endif - -#qt code -QTOBJS= \ - qbitarray.o \ - qbuffer.o \ - qarraydata.o \ - qbytearray.o \ - qcryptographichash.o \ - qvsnprintf.o \ - qbytearraymatcher.o \ - qconfig.o \ - qdatetime.o \ - qdir.o \ - qdiriterator.o \ - qfiledevice.o \ - qfile.o \ - qtemporaryfile.o \ - qfileinfo.o \ - qabstractfileengine.o \ - qfilesystementry.o \ - qfilesystemengine.o \ - qfilesystemengine_win.o \ - qfilesystemiterator_win.o \ - qfsfileengine.o \ - qfsfileengine_iterator.o \ - qfsfileengine_win.o \ - qglobal.o \ - qhash.o \ - qiodevice.o \ - qlibraryinfo.o \ - qlist.o \ - qlinkedlist.o \ - qlocale.o \ - qlocale_tools.o \ - qlocale_win.o \ - qmalloc.o \ - qmap.o \ - qregexp.o \ - qtextcodec.o \ - qutfcodec.o \ - qstring.o \ - qstringlist.o \ - qstringbuilder.o \ - qsystemerror.o \ - qsystemlibrary.o \ - qtextstream.o \ - quuid.o \ - qvector.o \ - qsettings.o \ - qsettings_win.o \ - qvariant.o \ - qmetatype.o \ - qxmlstream.o \ - qxmlutils.o \ - qnumeric.o \ - qlogging.o - - -qmake.exe: $(OBJS) $(QTOBJS) - $(LINKQMAKE) - -$(COPY) qmake.exe $(BUILD_PATH)\bin\qmake.exe - -Makefile: $(SOURCE_PATH)/qmake/Makefile.win32-g++ - @echo "Out of date, please rerun configure" - -clean:: - -$(DEL) $(OBJS) $(QTOBJS) $(ADDCLEAN) - -distclean:: clean - -$(DEL) qmake.exe - -.c.o: - $(CXX) $(CFLAGS) $< - -.cpp.o: - $(CXX) $(CXXFLAGS) $< - -QTVPATH = $(TOOLSRC)/shared/windows:$(CORESRC)/global:$(CORESRC)/kernel:$(CORESRC)/tools:$(CORESRC)/codecs:$(CORESRC)/io:$(CORESRC)/xml:$(CORESRC)/plugin:$(BUILD_PATH)/src/corelib/global -VPATH = $(QMKSRC):$(QMKLIBSRC):$(QMKSRC)/generators:$(QMKSRC)/generators/unix:$(QMKSRC)/generators/mac:$(QMKSRC)/generators/win32:$(QMKSRC)/generators/integrity:$(QTVPATH) - -project.o: $(QMKSRC)/project.h $(QMKSRC)/option.h -meta.o: $(QMKSRC)/project.h $(QMKSRC)/option.h -main.o: $(QMKSRC)/project.h -option.o: $(QMKSRC)/option.h -property.o: $(QMKSRC)/project.h $(QMKSRC)/option.h -- cgit v1.2.3 From a36eaae89338ce5a17a8c831a3fad2b746322f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 12 Nov 2012 15:48:36 +0100 Subject: Xcode: Merge various sources and extra-compilers into more managable groups Instead of letting each qmake variable have its own auto-generated name we try to group common variables into similar groups as used by the Xcode templates provided by Apple. We also prevent the same files from ending up multiple times in a group. Change-Id: I73b13d6071bb7b3cd1501c422a99c60743221485 Reviewed-by: Andy Shaw --- qmake/generators/mac/pbuilder_pbx.cpp | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 9893a7a7a4..0bf4b601b2 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -451,18 +451,17 @@ public: ProjectBuilderSources::ProjectBuilderSources(const QString &k, bool b, const QString &g, const QString &c, bool o) : buildable(b), object_output(o), key(k), group(g), compiler(c) { - if(group.isNull()) { - if(k == "SOURCES") - group = "Sources"; - else if(k == "HEADERS") - group = "Headers"; - else if(k == "QMAKE_INTERNAL_INCLUDED_FILES") - group = "Sources [qmake]"; - else if(k == "GENERATED_SOURCES" || k == "GENERATED_FILES") - group = "Temporary Sources"; - else - fprintf(stderr, "No group available for %s!\n", k.toLatin1().constData()); - } + // Override group name for a few common keys + if (k == "SOURCES" || k == "OBJECTIVE_SOURCES" || k == "HEADERS") + group = "Sources"; + else if (k == "QMAKE_INTERNAL_INCLUDED_FILES") + group = "Supporting Files"; + else if (k == "GENERATED_SOURCES" || k == "GENERATED_FILES") + group = "Generated Sources"; + else if (k == "RESOURCES") + group = "Resources"; + else if (group.isNull()) + group = QString("Sources [") + c + "]"; } QStringList @@ -545,10 +544,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) { if (project->isEmpty(ProKey(*it + ".output"))) continue; - ProString name = *it; - const ProKey nkey(*it + ".name"); - if (!project->isEmpty(nkey)) - name = project->first(nkey); const ProStringList &inputs = project->values(ProKey(*it + ".input")); for(int input = 0; input < inputs.size(); ++input) { if (project->isEmpty(inputs.at(input).toKey())) @@ -572,7 +567,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } } sources.append(ProjectBuilderSources(inputs.at(input).toQString(), true, - QString("Sources [") + name + "]", (*it).toQString(), isObj)); + QString(), (*it).toQString(), isObj)); } } } @@ -618,12 +613,17 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } last_grp = new_grp; } + if (groups[last_grp].contains(src_key)) + continue; groups[last_grp] += src_key; in_root = false; } } - if(in_root) + if (in_root) { + if (src_list.contains(src_key)) + continue; src_list.append(src_key); + } //source reference t << "\t\t" << src_key << " = {" << "\n" << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" -- cgit v1.2.3 From e70e81d554f0e3ff459a8cae4646ea4b003d9412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 12 Nov 2012 13:50:40 +0100 Subject: Xcode: Change groups/build phase wording to match Apple's templates Change-Id: I286965a05750bc77b94ca4d3b76364b0130e32ed Reviewed-by: Andy Shaw --- qmake/generators/mac/pbuilder_pbx.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 0bf4b601b2..2c7715ecf2 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -786,7 +786,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) //SOURCE BUILDPHASE if(!project->isEmpty("QMAKE_PBX_OBJ")) { - QString grp = "Build Sources", key = keyFor(grp); + QString grp = "Compile Sources", key = keyFor(grp); project->values("QMAKE_PBX_BUILDPHASES").append(key); t << "\t\t" << key << " = {" << "\n" << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" @@ -967,7 +967,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) if(!project->isEmpty("QMAKE_PBX_LIBRARIES")) { tmp = project->values("QMAKE_PBX_LIBRARIES"); if(!tmp.isEmpty()) { - QString grp("External Frameworks and Libraries"), key = keyFor(grp); + QString grp("Frameworks"), key = keyFor(grp); project->values("QMAKE_PBX_GROUPS").append(key); t << "\t\t" << key << " = {" << "\n" << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_LIBRARIES"), SettingsAsList, 4) << ";" << "\n" @@ -980,7 +980,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } } { - QString grp("Frameworks & Libraries"), key = keyFor(grp); + QString grp("Link Binary With Libraries"), key = keyFor(grp); project->values("QMAKE_PBX_BUILDPHASES").append(key); t << "\t\t" << key << " = {" << "\n" << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" -- cgit v1.2.3 From 66f6e5b1621fba4d7a8d6d63c5d5e33ad938c04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 13 Nov 2012 15:26:17 +0100 Subject: qmake: Update Xcode generator to produce project files similar to Xcode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was quite a bit of cruft left over from older Xcode version. We now produce Xcode 3.2 compatible files, similar to what Xcode would do when asked to upgrade one of our generated files. In particular: - Removed refType - Set more lastKnownFileTypes - Renamed defaultConfigurationIsName to defaultConfigurationName - Add runOnlyForDeploymentPostprocessing = 0 to build phases - Don't put buildSettings directly into PBXNativeTarget - Don't write productSettingsXML - Don't write startupPath - Don't write name when path is the exact same - Write empty buildSetting lists as empty string - Don't write empty PBXBuildFile settings - Don't write generated/neede filenames for PBXShellScriptBuildPhase - Use PBXFileReference instad of PBXFrameworkReference - Prune deprecated buildSetting variables - Remove deprecated PBXBuildStyle sections - Resolve correct CC/CPLUSPLUS/LDPLUSPLUS - Write IPHONEOS_DEPLOYMENT_TARGET Change-Id: Ia2365c2623fe898878bd10636c3b85145c1cff04 Reviewed-by: Andy Shaw Reviewed-by: Morten Johan Sørvig --- qmake/generators/mac/pbuilder_pbx.cpp | 435 ++++++++++++++-------------------- 1 file changed, 180 insertions(+), 255 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 2c7715ecf2..c68b3d4f83 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #ifdef Q_OS_UNIX @@ -222,7 +223,6 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) << "\t\t\t" << writeSettings("lastKnownFileType", "wrapper.pb-project") << ";" << "\n" << "\t\t\t" << writeSettings("name", escapeFilePath(tmp_proj.first("TARGET") + projectSuffix())) << ";" << "\n" << "\t\t\t" << writeSettings("path", pbxproj) << ";" << "\n" - << "\t\t\t" << writeSettings("refType", "0", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", "") << ";" << "\n" << "\t\t" << "};" << "\n"; //WRAPPER @@ -235,8 +235,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) t << "\t\t\t" << writeSettings("fileType", "compiled.mach-o.dylib") << ";" << "\n" << "\t\t\t" << writeSettings("path", tmp_proj.first("TARGET") + ".dylib") << ";" << "\n"; } - t << "\t\t\t" << writeSettings("refType", "3", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("remoteRef", keyFor(pbxproj + "_WRAPPERREF")) << ";" << "\n" + t << "\t\t\t" << writeSettings("remoteRef", keyFor(pbxproj + "_WRAPPERREF")) << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", "BUILT_PRODUCTS_DIR", SettingsNoQuote) << ";" << "\n" << "\t\t" << "};" << "\n"; t << "\t\t" << keyFor(pbxproj + "_WRAPPERREF") << " = {" << "\n" @@ -252,7 +251,6 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) << "\t\t\t" << writeSettings("children", project->values(ProKey(pbxproj + "_WRAPPER")), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("name", "Products") << ";" << "\n" - << "\t\t\t" << writeSettings("refType", "4", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", "") << ";" << "\n" << "\t\t" << "};" << "\n"; } @@ -291,14 +289,13 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("children", grp_it.value(), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("name", escapeFilePath(grp_it.key().section(Option::dir_sep, -1))) << ";" << "\n" - << "\t\t\t" << writeSettings("refType", "4", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", "") << ";" << "\n" << "\t\t" << "};" << "\n"; } //DUMP EVERYTHING THAT TIES THE ABOVE TOGETHER - //BUILDSTYLE - QString active_buildstyle; + //BUILDCONFIGURATIONS + QString defaultConfig; for(int as_release = 0; as_release < 2; as_release++) { QMap settings; @@ -320,6 +317,8 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) } QString name = (as_release ? "Release" : "Debug"); + if (project->isActiveConfig("debug") != (bool)as_release) + defaultConfig = name; QString key = keyFor("QMAKE_SUBDIR_PBX_BUILDCONFIG_" + name); project->values("QMAKE_SUBDIR_PBX_BUILDCONFIGS").append(key); t << "\t\t" << key << " = {" << "\n" @@ -330,26 +329,12 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) t << "\t\t\t" << "};" << "\n" << "\t\t\t" << writeSettings("name", name) << ";" << "\n" << "\t\t" << "};" << "\n"; - - key = keyFor("QMAKE_SUBDIR_PBX_BUILDSTYLE_" + name); - project->values("QMAKE_SUBDIR_PBX_BUILDSTYLES").append(key); - if (project->isActiveConfig("debug") != (bool)as_release) - active_buildstyle = name; - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("buildRules", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << "buildSettings = {" << "\n"; - for(QMap::Iterator set_it = settings.begin(); set_it != settings.end(); ++set_it) - t << "\t\t\t\t" << writeSettings(set_it.key(), set_it.value()) << ";\n"; - t << "\t\t\t" << "};" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXBuildStyle", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", name) << ";" << "\n" - << "\t\t" << "};" << "\n"; } t << "\t\t" << keyFor("QMAKE_SUBDIR_PBX_BUILDCONFIG_LIST") << " = {" << "\n" << "\t\t\t" << writeSettings("isa", "XCConfigurationList", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("buildConfigurations", project->values("QMAKE_SUBDIR_PBX_BUILDCONFIGS"), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("defaultConfigurationIsVisible", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("defaultConfigurationIsName", active_buildstyle) << ";" << "\n" + << "\t\t\t" << writeSettings("defaultConfigurationName", defaultConfig, SettingsNoQuote) << ";" << "\n" << "\t\t" << "};" << "\n"; #ifdef GENERATE_AGGREGRATE_SUBDIR @@ -376,7 +361,6 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t) t << "\t\t" << keyFor("QMAKE_SUBDIR_PBX_ROOT_GROUP") << " = {" << "\n" << "\t\t\t" << writeSettings("children", project->values("QMAKE_SUBDIR_PBX_GROUPS"), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("refType", "4", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", "") << ";" << "\n" << "\t\t" << "};" << "\n"; @@ -482,6 +466,36 @@ ProjectBuilderSources::files(QMakeProject *project) const return ret; } +static QString xcodeFiletypeForFilename(const QString &filename) +{ + foreach (const QString &ext, Option::cpp_ext) { + if (filename.endsWith(ext)) + return QStringLiteral("sourcecode.cpp.cpp"); + } + + foreach (const QString &ext, Option::c_ext) { + if (filename.endsWith(ext)) + return QStringLiteral("sourcecode.c.c"); + } + + foreach (const QString &ext, Option::h_ext) { + if (filename.endsWith(ext)) + return "sourcecode.c.h"; + } + + if (filename.endsWith(QStringLiteral(".mm"))) + return QStringLiteral("sourcecode.cpp.objcpp"); + if (filename.endsWith(QStringLiteral(".m"))) + return QStringLiteral("sourcecode.c.objc"); + if (filename.endsWith(QStringLiteral(".framework"))) + return QStringLiteral("wrapper.framework"); + if (filename.endsWith(QStringLiteral(".a"))) + return QStringLiteral("archive.ar"); + if (filename.endsWith(QStringLiteral(".pro")) || filename.endsWith(QStringLiteral(".qrc"))) + return QStringLiteral("text"); + + return QString(); +} bool ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) @@ -522,10 +536,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) t << "\t\t" << phase_key << " = {" << "\n" << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("generatedFileNames", ProStringList(), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("name", "Qt Qmake") << ";" << "\n" - << "\t\t\t" << writeSettings("neededFileNames", ProStringList(), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";" << "\n" << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";" << "\n" << "\t\t" << "};" << "\n"; @@ -627,21 +640,15 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) //source reference t << "\t\t" << src_key << " = {" << "\n" << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(name)) << ";" << "\n" - << "\t\t\t" << writeSettings("path", escapeFilePath(file)) << ";" << "\n" - << "\t\t\t" << writeSettings("refType", QString::number(reftypeForFile(file)), SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(file)) << ";" << "\n"; - QString filetype; - for (QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) { - if (file.endsWith((*cppit))) { - filetype = "sourcecode.cpp.cpp"; - break; - } - } + << "\t\t\t" << writeSettings("path", escapeFilePath(file)) << ";" << "\n"; + if (name != file) + t << "\t\t\t" << writeSettings("name", escapeFilePath(name)) << ";" << "\n"; + t << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(file)) << ";" << "\n"; + QString filetype = xcodeFiletypeForFilename(file); if (!filetype.isNull()) t << "\t\t\t" << writeSettings("lastKnownFileType", filetype) << ";" << "\n"; t << "\t\t" << "};" << "\n"; - if(sources.at(source).isBuildable()) { //build reference + if (sources.at(source).isBuildable() && sources.at(source).isObjectOutput(file)) { //build reference QString build_key = keyFor(file + ".BUILDABLE"); t << "\t\t" << build_key << " = {" << "\n" << "\t\t\t" << writeSettings("fileRef", src_key) << ";" << "\n" @@ -650,8 +657,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t\t" << writeSettings("ATTRIBUTES", ProStringList(), SettingsAsList, 5) << ";" << "\n" << "\t\t\t" << "};" << "\n" << "\t\t" << "};" << "\n"; - if(sources.at(source).isObjectOutput(file)) - project->values("QMAKE_PBX_OBJ").append(build_key); + project->values("QMAKE_PBX_OBJ").append(build_key); } } if(!src_list.isEmpty()) { @@ -671,7 +677,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("children", grp_it.value(), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("name", escapeFilePath(grp_it.key().section(Option::dir_sep, -1))) << ";" << "\n" - << "\t\t\t" << writeSettings("refType", "4", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", "") << ";" << "\n" << "\t\t" << "};" << "\n"; } @@ -775,10 +780,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) t << "\t\t" << phase_key << " = {" << "\n" << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("generatedFileNames", fixListForOutput("QMAKE_PBX_OBJ"), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("name", "Qt Preprocessors") << ";" << "\n" - << "\t\t\t" << writeSettings("neededFileNames", fixListForOutput("QMAKE_PBX_OBJ"), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";" << "\n" << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";" << "\n" << "\t\t" << "};" << "\n"; @@ -792,6 +796,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("files", fixListForOutput("QMAKE_PBX_OBJ"), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXSourcesBuildPhase", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("name", grp) << ";" << "\n" << "\t\t" << "};" << "\n"; } @@ -899,22 +904,21 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) libdirs += path; } library = fileFixify(library); + QString filetype = xcodeFiletypeForFilename(library); QString key = keyFor(library); - bool is_frmwrk = (library.endsWith(".framework")); t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", (is_frmwrk ? "PBXFrameworkReference" : "PBXFileReference"), SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("name", escapeFilePath(name)) << ";" << "\n" << "\t\t\t" << writeSettings("path", escapeFilePath(library)) << ";" << "\n" - << "\t\t\t" << writeSettings("refType", QString::number(reftypeForFile(library)), SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(library)) << ";" << "\n" - << "\t\t" << "};" << "\n"; + << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(library)) << ";" << "\n"; + if (!filetype.isNull()) + t << "\t\t\t" << writeSettings("lastKnownFileType", filetype) << ";" << "\n"; + t << "\t\t" << "};" << "\n"; project->values("QMAKE_PBX_LIBRARIES").append(key); QString build_key = keyFor(library + ".BUILDABLE"); t << "\t\t" << build_key << " = {" << "\n" << "\t\t\t" << writeSettings("fileRef", key) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXBuildFile", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << "settings = {" << "\n" - << "\t\t\t" << "};" << "\n" << "\t\t" << "};" << "\n"; project->values("QMAKE_PBX_BUILD_LIBRARIES").append(build_key); } @@ -955,10 +959,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) t << "\t\t" << phase_key << " = {" << "\n" << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("generatedFileNames", ProStringList(), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("name", "Qt Sublibs") << ";" << "\n" - << "\t\t\t" << writeSettings("neededFileNames", ProStringList(), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("shellPath", "/bin/sh") << "\n" << "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(qmake_getpwd()) + " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";" << "\n" << "\t\t" << "};" << "\n"; @@ -973,8 +976,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_LIBRARIES"), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";" << "\n" - << "\t\t\t" << writeSettings("path", ProStringList()) << ";" << "\n" - << "\t\t\t" << writeSettings("refType", "4", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", "") << ";" << "\n" << "\t\t" << "};" << "\n"; } @@ -986,6 +987,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("files", project->values("QMAKE_PBX_BUILD_LIBRARIES"), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXFrameworksBuildPhase", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";" << "\n" << "\t\t" << "};" << "\n"; } @@ -1003,6 +1005,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } t << "\t\t\t" << ");" << "\n" << "\t\t\t" << writeSettings("isa", "PBXResourcesBuildPhase", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";" << "\n" << "\t\t" << "};" << "\n"; } @@ -1040,7 +1043,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) t << "\t\t" << file_ref_key << " = {" << "\n" << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("path", escapeFilePath(fn)) << ";" << "\n" - << "\t\t\t" << writeSettings("refType", QString::number(reftypeForFile(fn)), SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(fn)) << ";" << "\n" << "\t\t" << "};" << "\n"; QString copy_file_key = keyFor("QMAKE_PBX_BUNDLE_COPY_FILE." + bundle_data[i] + "-" + fn); @@ -1048,8 +1050,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) t << "\t\t" << copy_file_key << " = {\n" << "\t\t\t" << writeSettings("fileRef", file_ref_key) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXBuildFile", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << "settings = {\n" - << "\t\t\t" << "}" << ";" << "\n" << "\t\t" << "}" << ";" << "\n"; } //the phase @@ -1076,26 +1076,15 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("children", bundle_file_refs, SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("name", "Source [bundle data]") << ";" << "\n" - << "\t\t\t" << writeSettings("path", ProStringList()) << ";" << "\n" - << "\t\t\t" << writeSettings("refType", "4", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", "") << ";" << "\n" << "\t\t" << "};" << "\n"; } - //DUMP EVERYTHING THAT TIES THE ABOVE TOGETHER - //ROOT_GROUP - t << "\t\t" << keyFor("QMAKE_PBX_ROOT_GROUP") << " = {" << "\n" - << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_GROUPS"), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";" << "\n" - << "\t\t\t" << writeSettings("path", ProStringList()) << ";" << "\n" - << "\t\t\t" << writeSettings("refType", "4", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "") << ";" << "\n" - << "\t\t" << "};" << "\n"; //REFERENCE project->values("QMAKE_PBX_PRODUCTS").append(keyFor(pbx_dir + "QMAKE_PBX_REFERENCE")); t << "\t\t" << keyFor(pbx_dir + "QMAKE_PBX_REFERENCE") << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n"; + << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("includeInIndex", "0", SettingsNoQuote) << ";" << "\n"; if(project->first("TEMPLATE") == "app") { ProString targ = project->first("QMAKE_ORIG_TARGET"); if(project->isActiveConfig("bundle") && !project->isEmpty("QMAKE_BUNDLE_EXTENSION")) { @@ -1110,7 +1099,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) targ += ".app"; t << "\t\t\t" << writeSettings("explicitFileType", "wrapper.application") << ";" << "\n"; } else { - t << "\t\t\t" << writeSettings("explicitFileType", "wrapper.executable") << ";" << "\n"; + t << "\t\t\t" << writeSettings("explicitFileType", "compiled.mach-o.executable") << ";" << "\n"; } QString app = (!project->isEmpty("DESTDIR") ? project->first("DESTDIR") + project->first("QMAKE_ORIG_TARGET") : qmake_getpwd()) + Option::dir_sep + targ; @@ -1144,8 +1133,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } t << "\t\t\t" << writeSettings("path", escapeFilePath(lib)) << ";" << "\n"; } - t << "\t\t\t" << writeSettings("refType", "3", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", "BUILT_PRODUCTS_DIR", SettingsNoQuote) << ";" << "\n" + t << "\t\t\t" << writeSettings("sourceTree", "BUILT_PRODUCTS_DIR", SettingsNoQuote) << ";" << "\n" << "\t\t" << "};" << "\n"; { //Products group QString grp("Products"), key = keyFor(grp); @@ -1154,177 +1142,38 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_PRODUCTS"), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("name", "Products") << ";" << "\n" - << "\t\t\t" << writeSettings("refType", "4", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", "") << ";" << "\n" << "\t\t" << "};" << "\n"; } + + //DUMP EVERYTHING THAT TIES THE ABOVE TOGETHER + //ROOT_GROUP + t << "\t\t" << keyFor("QMAKE_PBX_ROOT_GROUP") << " = {" << "\n" + << "\t\t\t" << writeSettings("children", project->values("QMAKE_PBX_GROUPS"), SettingsAsList, 4) << ";" << "\n" + << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("name", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";" << "\n" + << "\t\t\t" << writeSettings("sourceTree", "") << ";" << "\n" + << "\t\t" << "};" << "\n"; + //TARGET QString target_key = keyFor(pbx_dir + "QMAKE_PBX_TARGET"); project->values("QMAKE_PBX_TARGETS").append(target_key); t << "\t\t" << target_key << " = {" << "\n" << "\t\t\t" << writeSettings("buildPhases", project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES") + project->values("QMAKE_PBX_BUILDPHASES"), - SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << "buildSettings = {" << "\n"; - ProString cCompiler = project->first("QMAKE_CC"); - if (!cCompiler.isEmpty()) { - t << "\t\t\t\t" << writeSettings("CC", fixForOutput(findProgram(cCompiler))) << ";" << "\n"; - } - cCompiler = project->first("QMAKE_CXX"); - if (!cCompiler.isEmpty()) { - t << "\t\t\t\t" << writeSettings("CPLUSPLUS", fixForOutput(findProgram(cCompiler))) << ";" << "\n"; - } - - t << "\t\t\t\t" << writeSettings("LEXFLAGS", fixListForOutput("QMAKE_LEXFLAGS")) << ";" << "\n" - << "\t\t\t\t" << writeSettings("YACCFLAGS", fixListForOutput("QMAKE_YACCFLAGS")) << ";" << "\n" - << "\t\t\t\t" << writeSettings("OTHER_REZFLAGS", ProStringList()) << ";" << "\n" - << "\t\t\t\t" << writeSettings("SECTORDER_FLAGS", ProStringList()) << ";" << "\n" - << "\t\t\t\t" << writeSettings("WARNING_CFLAGS", ProStringList()) << ";" << "\n" - << "\t\t\t\t" << writeSettings("PREBINDING", ProStringList((project->isEmpty("QMAKE_DO_PREBINDING") ? "NO" : "YES")), SettingsNoQuote) << ";" << "\n"; - if((project->first("TEMPLATE") == "app" && project->isActiveConfig("app_bundle")) || - (project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") && - project->isActiveConfig("lib_bundle"))) { - QString plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString()); - if(plist.isEmpty()) - plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE"); - if(exists(plist)) { - QFile plist_in_file(plist); - if(plist_in_file.open(QIODevice::ReadOnly)) { - QTextStream plist_in(&plist_in_file); - QString plist_in_text = plist_in.readAll(); - plist_in_text = plist_in_text.replace("@ICON@", - (project->isEmpty("ICON") ? QString("") : project->first("ICON").toQString().section(Option::dir_sep, -1))); - if(project->first("TEMPLATE") == "app") { - plist_in_text = plist_in_text.replace("@EXECUTABLE@", project->first("QMAKE_ORIG_TARGET").toQString()); - } else { - plist_in_text = plist_in_text.replace("@LIBRARY@", project->first("QMAKE_ORIG_TARGET").toQString()); - } - if (!project->values("VERSION").isEmpty()) { - plist_in_text = plist_in_text.replace("@SHORT_VERSION@", project->first("VER_MAJ") + "." + - project->first("VER_MIN")); - } - plist_in_text = plist_in_text.replace("@TYPEINFO@", - (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : - project->first("QMAKE_PKGINFO_TYPEINFO").left(4).toQString())); - QFile plist_out_file("Info.plist"); - if(plist_out_file.open(QIODevice::WriteOnly | QIODevice::Text)) { - QTextStream plist_out(&plist_out_file); - plist_out << plist_in_text; - t << "\t\t\t\t" << writeSettings("INFOPLIST_FILE", "Info.plist") << ";" << "\n"; - } - } - } - } -#if 1 - t << "\t\t\t\t" << writeSettings("BUILD_ROOT", escapeFilePath(qmake_getpwd())) << ";" << "\n"; -#endif - if(!project->isActiveConfig("staticlib")) { - t << "\t\t\t\t" << writeSettings("OTHER_LDFLAGS", - fixListForOutput("SUBLIBS") - + fixListForOutput("QMAKE_LFLAGS") - + fixListForOutput("QMAKE_LIBS") - + fixListForOutput("QMAKE_LIBS_PRIVATE"), - SettingsAsList, 6) << ";" << "\n"; - } - if(!project->isEmpty("DESTDIR")) { - ProString dir = project->first("DESTDIR"); - if (QDir::isRelativePath(dir.toQString())) - dir.prepend(qmake_getpwd() + Option::dir_sep); - t << "\t\t\t\t" << writeSettings("INSTALL_DIR", dir) << ";" << "\n"; - } - if (project->first("TEMPLATE") == "lib") { - t << "\t\t\t\t" << writeSettings("INSTALL_PATH", ProStringList()) << ";" << "\n"; - } - if(!project->isEmpty("VERSION") && project->first("VERSION") != "0.0.0") { - t << "\t\t\t\t" << writeSettings("DYLIB_CURRENT_VERSION", project->first("VER_MAJ")+"."+project->first("VER_MIN")+"."+project->first("VER_PAT")) << ";" << "\n"; - if(project->isEmpty("COMPAT_VERSION")) - t << "\t\t\t\t" << writeSettings("DYLIB_COMPATIBILITY_VERSION", project->first("VER_MAJ")+"."+project->first("VER_MIN")) << ";" << "\n"; - if(project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") && - project->isActiveConfig("lib_bundle")) - t << "\t\t\t\t" << writeSettings("FRAMEWORK_VERSION", project->first("QMAKE_FRAMEWORK_VERSION")) << ";" << "\n"; - } - if(!project->isEmpty("COMPAT_VERSION")) - t << "\t\t\t\t" << writeSettings("DYLIB_COMPATIBILITY_VERSION", project->first("COMPAT_VERSION")) << ";" << "\n"; - if(!project->isEmpty("QMAKE_MACOSX_DEPLOYMENT_TARGET")) - t << "\t\t\t\t" << writeSettings("MACOSX_DEPLOYMENT_TARGET", project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET")) << ";" << "\n"; - if(project->first("TEMPLATE") == "app") { - t << "\t\t\t\t" << writeSettings("PRODUCT_NAME", fixForOutput(project->first("QMAKE_ORIG_TARGET").toQString())) << ";" << "\n"; - } else { - if(!project->isActiveConfig("plugin") && project->isActiveConfig("staticlib")) { - t << "\t\t\t\t" << writeSettings("LIBRARY_STYLE", "STATIC") << ";" << "\n"; - } else { - t << "\t\t\t\t" << writeSettings("LIBRARY_STYLE", "DYNAMIC") << ";" << "\n"; - } - ProString lib = project->first("QMAKE_ORIG_TARGET"); - if(!project->isActiveConfig("lib_bundle") && !project->isActiveConfig("staticlib")) - lib.prepend("lib"); - t << "\t\t\t\t" << writeSettings("PRODUCT_NAME", escapeFilePath(lib)) << ";" << "\n"; - } - tmp = project->values("QMAKE_PBX_VARS"); - for(int i = 0; i < tmp.count(); i++) { - QString var = tmp[i].toQString(), val = QString::fromLocal8Bit(qgetenv(var.toLatin1().constData())); - if(val.isEmpty() && var == "TB") - val = "/usr/bin/"; - t << "\t\t\t\t" << writeSettings(var, escapeFilePath(val)) << ";" << "\n"; - } - t << "\t\t\t" << "};" << "\n" - << "\t\t\t" << "conditionalBuildSettings = {" << "\n" - << "\t\t\t" << "};" << "\n" - << "\t\t\t" << writeSettings("dependencies", project->values("QMAKE_PBX_TARGET_DEPENDS"), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("productReference", keyFor(pbx_dir + "QMAKE_PBX_REFERENCE")) << ";" << "\n" - << "\t\t\t" << writeSettings("shouldUseHeadermap", "1", SettingsNoQuote) << ";" << "\n"; + SettingsAsList, 4) << ";" << "\n"; + t << "\t\t\t" << writeSettings("dependencies", project->values("QMAKE_PBX_TARGET_DEPENDS"), SettingsAsList, 4) << ";" << "\n" + << "\t\t\t" << writeSettings("productReference", keyFor(pbx_dir + "QMAKE_PBX_REFERENCE")) << ";" << "\n"; t << "\t\t\t" << writeSettings("buildConfigurationList", keyFor("QMAKE_PBX_BUILDCONFIG_LIST_TARGET"), SettingsNoQuote) << ";" << "\n"; t << "\t\t\t" << writeSettings("isa", "PBXNativeTarget", SettingsNoQuote) << ";" << "\n"; + t << "\t\t\t" << writeSettings("buildRules", ProStringList(), SettingsAsList) << ";" << "\n"; if(project->first("TEMPLATE") == "app") { - if(!project->isActiveConfig("app_bundle")) { - if (!project->isEmpty("QMAKE_PBX_PRODUCT_TYPE")) - t << "\t\t\t" << writeSettings("productType", project->first("QMAKE_PBX_PRODUCT_TYPE")) << ";" << "\n"; - else - t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.tool") << ";" << "\n"; + if (!project->isEmpty("QMAKE_PBX_PRODUCT_TYPE")) { + t << "\t\t\t" << writeSettings("productType", project->first("QMAKE_PBX_PRODUCT_TYPE")) << ";" << "\n"; } else { - if (!project->isEmpty("QMAKE_PBX_PRODUCT_TYPE")) - t << "\t\t\t" << writeSettings("productType", project->first("QMAKE_PBX_PRODUCT_TYPE")) << ";" << "\n"; - else + if (project->isActiveConfig("app_bundle")) t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.application") << ";" << "\n"; - t << "\t\t\t" << "productSettingsXML = \""; - bool read_plist = false; - if(exists("Info.plist")) { - QFile plist("Info.plist"); - if (plist.open(QIODevice::ReadOnly)) { - read_plist = true; - QTextStream stream(&plist); - while(!stream.atEnd()) - t << stream.readLine().replace('"', "\\\"") << endl; - } - } - if(!read_plist) { - t << "" << "\n" - << "\t\t\t\t" << "" << "\n" - << "\t\t\t\t" << "" << "\n" - << "\t\t\t\t" << "" << "\n" - << "\t\t\t\t\t" << "CFBundleDevelopmentRegion" << "\n" - << "\t\t\t\t\t" << "English" << "\n" - << "\t\t\t\t\t" << "CFBundleExecutable" << "\n" - << "\t\t\t\t\t" << "" << project->first("QMAKE_ORIG_TARGET") << "" << "\n" - << "\t\t\t\t\t" << "CFBundleIconFile" << "\n" - << "\t\t\t\t\t" << "" << var("ICON").section(Option::dir_sep, -1) << "" << "\n" - << "\t\t\t\t\t" << "CFBundleInfoDictionaryVersion" << "\n" - << "\t\t\t\t\t" << "6.0" << "\n" - << "\t\t\t\t\t" << "CFBundlePackageType" << "\n" - << "\t\t\t\t\t" << "APPL" << "\n" - << "\t\t\t\t\t" << "CFBundleSignature" << "\n" - << "\t\t\t\t\t" << "" - << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : - project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << "" << "\n" - << "\t\t\t\t\t" << "CFBundleVersion" << "\n" - << "\t\t\t\t\t" << "0.1" << "\n" - << "\t\t\t\t\t" << "CSResourcesFileMapped" << "\n" - << "\t\t\t\t\t" << "" << "\n" - << "\t\t\t\t" << "" << "\n" - << "\t\t\t\t" << ""; - } - t << "\";" << "\n"; + else + t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.tool") << ";" << "\n"; } t << "\t\t\t" << writeSettings("name", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";" << "\n" << "\t\t\t" << writeSettings("productName", escapeFilePath(project->first("QMAKE_ORIG_TARGET"))) << ";" << "\n"; @@ -1343,12 +1192,11 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) else t << "\t\t\t" << writeSettings("productType", "com.apple.product-type.library.dynamic") << ";" << "\n"; } - t << "\t\t\t" << writeSettings("startupPath", "<>") << ";" << "\n"; if(!project->isEmpty("DESTDIR")) t << "\t\t\t" << writeSettings("productInstallPath", escapeFilePath(project->first("DESTDIR"))) << ";" << "\n"; t << "\t\t" << "};" << "\n"; //DEBUG/RELEASE - QString active_buildstyle; + QString defaultConfig; for(int as_release = 0; as_release < 2; as_release++) { QMap settings; @@ -1379,6 +1227,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } QString name = (as_release ? "Release" : "Debug"); + if (project->isActiveConfig("debug") != (bool)as_release) + defaultConfig = name; for (int i = 0; i < buildConfigGroups.size(); i++) { QString key = keyFor("QMAKE_PBX_BUILDCONFIG_" + name + buildConfigGroups.at(i)); project->values(ProKey("QMAKE_PBX_BUILDCONFIGS_" + buildConfigGroups.at(i))).append(key); @@ -1387,15 +1237,100 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << "buildSettings = {" << "\n"; for (QMap::Iterator set_it = settings.begin(); set_it != settings.end(); ++set_it) t << "\t\t\t\t" << writeSettings(set_it.key(), set_it.value()) << ";\n"; - if (!project->isEmpty("PRECOMPILED_HEADER")) { - t << "\t\t\t\t" << writeSettings("GCC_PRECOMPILE_PREFIX_HEADER", "YES") << ";" << "\n" - << "\t\t\t\t" << writeSettings("GCC_PREFIX_HEADER", escapeFilePath(project->first("PRECOMPILED_HEADER"))) << ";" << "\n"; - } if (buildConfigGroups.at(i) == QLatin1String("PROJECT")) { + if (!project->isEmpty("QMAKE_XCODE_GCC_VERSION")) + t << "\t\t\t\t" << writeSettings("GCC_VERSION", project->first("QMAKE_XCODE_GCC_VERSION"), SettingsNoQuote) << ";" << "\n"; + ProString program = project->first("QMAKE_CC"); + if (!program.isEmpty()) + t << "\t\t\t\t" << writeSettings("CC", fixForOutput(findProgram(program))) << ";" << "\n"; + program = project->first("QMAKE_CXX"); + // Xcode will automatically take care of using CC with the right -x option, + // and will actually break if we pass CPLUSPLUS, by adding an additional set of "++" + if (!program.isEmpty() && !program.contains("clang++")) + t << "\t\t\t\t" << writeSettings("CPLUSPLUS", fixForOutput(findProgram(program))) << ";" << "\n"; + program = project->first("QMAKE_LINK"); + if (!program.isEmpty()) + t << "\t\t\t\t" << writeSettings("LDPLUSPLUS", fixForOutput(findProgram(program))) << ";" << "\n"; + + if ((project->first("TEMPLATE") == "app" && project->isActiveConfig("app_bundle")) || + (project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") && + project->isActiveConfig("lib_bundle"))) { + QString plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString()); + if (plist.isEmpty()) + plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE"); + if (exists(plist)) { + QFile plist_in_file(plist); + if (plist_in_file.open(QIODevice::ReadOnly)) { + QTextStream plist_in(&plist_in_file); + QString plist_in_text = plist_in.readAll(); + plist_in_text = plist_in_text.replace("@ICON@", + (project->isEmpty("ICON") ? QString("") : project->first("ICON").toQString().section(Option::dir_sep, -1))); + if (project->first("TEMPLATE") == "app") { + plist_in_text = plist_in_text.replace("@EXECUTABLE@", project->first("QMAKE_ORIG_TARGET").toQString()); + } else { + plist_in_text = plist_in_text.replace("@LIBRARY@", project->first("QMAKE_ORIG_TARGET").toQString()); + } + if (!project->values("VERSION").isEmpty()) { + plist_in_text = plist_in_text.replace("@SHORT_VERSION@", project->first("VER_MAJ") + "." + + project->first("VER_MIN")); + } + plist_in_text = plist_in_text.replace("@TYPEINFO@", + (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") + ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4).toQString())); + QFile plist_out_file("Info.plist"); + if (plist_out_file.open(QIODevice::WriteOnly | QIODevice::Text)) { + QTextStream plist_out(&plist_out_file); + plist_out << plist_in_text; + t << "\t\t\t\t" << writeSettings("INFOPLIST_FILE", "Info.plist") << ";" << "\n"; + } + } + } + } + + t << "\t\t\t\t" << writeSettings("SYMROOT", escapeFilePath(qmake_getpwd())) << ";" << "\n"; + + if (!project->isEmpty("DESTDIR")) { + ProString dir = project->first("DESTDIR"); + if (QDir::isRelativePath(dir.toQString())) + dir.prepend(qmake_getpwd() + Option::dir_sep); + t << "\t\t\t\t" << writeSettings("TARGET_BUILD_DIR", dir) << ";" << "\n"; + } + + if (project->first("TEMPLATE") == "lib") + t << "\t\t\t\t" << writeSettings("INSTALL_PATH", ProStringList()) << ";" << "\n"; + + if (!project->isEmpty("VERSION") && project->first("VERSION") != "0.0.0") { + t << "\t\t\t\t" << writeSettings("DYLIB_CURRENT_VERSION", project->first("VER_MAJ")+"."+project->first("VER_MIN")+"."+project->first("VER_PAT")) << ";" << "\n"; + if (project->isEmpty("COMPAT_VERSION")) + t << "\t\t\t\t" << writeSettings("DYLIB_COMPATIBILITY_VERSION", project->first("VER_MAJ")+"."+project->first("VER_MIN")) << ";" << "\n"; + if (project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") && + project->isActiveConfig("lib_bundle")) + t << "\t\t\t\t" << writeSettings("FRAMEWORK_VERSION", project->first("QMAKE_FRAMEWORK_VERSION")) << ";" << "\n"; + } + if (!project->isEmpty("COMPAT_VERSION")) + t << "\t\t\t\t" << writeSettings("DYLIB_COMPATIBILITY_VERSION", project->first("COMPAT_VERSION")) << ";" << "\n"; + + if (!project->isEmpty("QMAKE_MACOSX_DEPLOYMENT_TARGET")) + t << "\t\t\t\t" << writeSettings("MACOSX_DEPLOYMENT_TARGET", project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET")) << ";" << "\n"; + if (!project->isEmpty("QMAKE_IOS_DEPLOYMENT_TARGET")) + t << "\t\t\t\t" << writeSettings("IPHONEOS_DEPLOYMENT_TARGET", project->first("QMAKE_IOS_DEPLOYMENT_TARGET")) << ";" << "\n"; + + tmp = project->values("QMAKE_PBX_VARS"); + for (int i = 0; i < tmp.count(); i++) { + QString var = tmp[i].toQString(), val = QString::fromLocal8Bit(qgetenv(var.toLatin1().constData())); + if (val.isEmpty() && var == "TB") + val = "/usr/bin/"; + t << "\t\t\t\t" << writeSettings(var, escapeFilePath(val)) << ";" << "\n"; + } + if (!project->isEmpty("PRECOMPILED_HEADER")) { + t << "\t\t\t\t" << writeSettings("GCC_PRECOMPILE_PREFIX_HEADER", "YES") << ";" << "\n" + << "\t\t\t\t" << writeSettings("GCC_PREFIX_HEADER", escapeFilePath(project->first("PRECOMPILED_HEADER"))) << ";" << "\n"; + } t << "\t\t\t\t" << writeSettings("HEADER_SEARCH_PATHS", fixListForOutput("INCLUDEPATH") + ProStringList(fixForOutput(specdir())), SettingsAsList, 5) << ";" << "\n" << "\t\t\t\t" << writeSettings("LIBRARY_SEARCH_PATHS", fixListForOutput("QMAKE_PBX_LIBPATHS"), SettingsAsList, 5) << ";" << "\n" - << "\t\t\t\t" << writeSettings("FRAMEWORK_SEARCH_PATHS", fixListForOutput("QMAKE_FRAMEWORKPATH"), SettingsAsList, 5) << ";" << "\n" - << "\t\t\t\t" << writeSettings("INFOPLIST_FILE", "Info.plist") << ";" << "\n"; + << "\t\t\t\t" << writeSettings("FRAMEWORK_SEARCH_PATHS", fixListForOutput("QMAKE_FRAMEWORKPATH"), + !project->values("QMAKE_FRAMEWORKPATH").isEmpty() ? SettingsAsList : 0, 5) << ";" << "\n"; + { ProStringList cflags = fixListForOutput("QMAKE_CFLAGS"); const ProStringList &prl_defines = project->values("PRL_EXPORT_DEFINES"); @@ -1446,20 +1381,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) t << "\t\t\t" << "};" << "\n" << "\t\t\t" << writeSettings("name", name) << ";" << "\n" << "\t\t" << "};" << "\n"; - - key = keyFor("QMAKE_PBX_BUILDSTYLE_" + name); - project->values("QMAKE_PBX_BUILDSTYLES").append(key); - if (project->isActiveConfig("debug") != (bool)as_release) - active_buildstyle = name; - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("buildRules", ProStringList(), SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << "buildSettings = {" << "\n"; - for(QMap::Iterator set_it = settings.begin(); set_it != settings.end(); ++set_it) - t << "\t\t\t\t" << writeSettings(set_it.key(), set_it.value()) << ";" << "\n"; - t << "\t\t\t" << "};" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXBuildStyle") << ";" << "\n" - << "\t\t\t" << writeSettings("name", name) << ";" << "\n" - << "\t\t" << "};" << "\n"; } } for (int i = 0; i < buildConfigGroups.size(); i++) { @@ -1467,20 +1388,24 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("isa", "XCConfigurationList", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("buildConfigurations", project->values(ProKey("QMAKE_PBX_BUILDCONFIGS_" + buildConfigGroups.at(i))), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("defaultConfigurationIsVisible", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("defaultConfigurationIsName", active_buildstyle) << ";" << "\n" + << "\t\t\t" << writeSettings("defaultConfigurationName", defaultConfig) << ";" << "\n" << "\t\t" << "};" << "\n"; } //ROOT t << "\t\t" << keyFor("QMAKE_PBX_ROOT") << " = {" << "\n" - << "\t\t\t" << writeSettings("buildStyles", project->values("QMAKE_PBX_BUILDSTYLES"), SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("hasScannedForEncodings", "1", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("compatibilityVersion", "Xcode 3.2") << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXProject", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("mainGroup", keyFor("QMAKE_PBX_ROOT_GROUP")) << ";" << "\n"; + << "\t\t\t" << writeSettings("mainGroup", keyFor("QMAKE_PBX_ROOT_GROUP")) << ";" << "\n" + << "\t\t\t" << writeSettings("productRefGroup", keyFor("Products")) << ";" << "\n"; t << "\t\t\t" << writeSettings("buildConfigurationList", keyFor("QMAKE_PBX_BUILDCONFIG_LIST_PROJECT")) << ";" << "\n"; t << "\t\t\t" << writeSettings("projectDirPath", ProStringList()) << ";" << "\n" + << "\t\t\t" << writeSettings("projectRoot", "") << ";" << "\n" << "\t\t\t" << writeSettings("targets", project->values("QMAKE_PBX_TARGETS"), SettingsAsList, 4) << ";" << "\n" << "\t\t" << "};" << "\n"; + // FIXME: Deal with developmentRegion and knownRegions for QMAKE_PBX_ROOT + //FOOTER t << "\t" << "};" << "\n" << "\t" << writeSettings("rootObject", keyFor("QMAKE_PBX_ROOT")) << ";" << "\n" -- cgit v1.2.3 From c6eae1acf8939e512d742578ef3c0c710d3c1653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 3 Dec 2012 14:55:19 +0100 Subject: qmake: Don't generate Xcode project bundle identifiers with spaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace them with dashes, like Xcode itself does. Change-Id: I302425363a2eef13394025cd4a9e414048ce55ce Reviewed-by: Morten Johan Sørvig --- qmake/generators/mac/pbuilder_pbx.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index c68b3d4f83..c5bf7bb7c9 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -1270,6 +1270,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } else { plist_in_text = plist_in_text.replace("@LIBRARY@", project->first("QMAKE_ORIG_TARGET").toQString()); } + plist_in_text = plist_in_text.replace("@BUNDLEIDENTIFIER@", QLatin1String("${PRODUCT_NAME:rfc1034identifier}")); if (!project->values("VERSION").isEmpty()) { plist_in_text = plist_in_text.replace("@SHORT_VERSION@", project->first("VER_MAJ") + "." + project->first("VER_MIN")); -- cgit v1.2.3 From 883efa10cdfd81cc4ccbcca55d42a454877d146e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 26 Feb 2013 13:12:25 +0100 Subject: qmake: Prevent duplicate libaries from being added to the link phase Change-Id: I5ec7acb8f060e9d9bbd8cdb95d40ace03cffe9c7 Reviewed-by: Richard Moe Gustavsen --- qmake/generators/mac/pbuilder_pbx.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index c5bf7bb7c9..87085318bc 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -906,21 +906,23 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) library = fileFixify(library); QString filetype = xcodeFiletypeForFilename(library); QString key = keyFor(library); - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(name)) << ";" << "\n" - << "\t\t\t" << writeSettings("path", escapeFilePath(library)) << ";" << "\n" - << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(library)) << ";" << "\n"; - if (!filetype.isNull()) - t << "\t\t\t" << writeSettings("lastKnownFileType", filetype) << ";" << "\n"; - t << "\t\t" << "};" << "\n"; - project->values("QMAKE_PBX_LIBRARIES").append(key); - QString build_key = keyFor(library + ".BUILDABLE"); - t << "\t\t" << build_key << " = {" << "\n" - << "\t\t\t" << writeSettings("fileRef", key) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXBuildFile", SettingsNoQuote) << ";" << "\n" - << "\t\t" << "};" << "\n"; - project->values("QMAKE_PBX_BUILD_LIBRARIES").append(build_key); + if (!project->values("QMAKE_PBX_LIBRARIES").contains(key)) { + t << "\t\t" << key << " = {" << "\n" + << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("name", escapeFilePath(name)) << ";" << "\n" + << "\t\t\t" << writeSettings("path", escapeFilePath(library)) << ";" << "\n" + << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(library)) << ";" << "\n"; + if (!filetype.isNull()) + t << "\t\t\t" << writeSettings("lastKnownFileType", filetype) << ";" << "\n"; + t << "\t\t" << "};" << "\n"; + project->values("QMAKE_PBX_LIBRARIES").append(key); + QString build_key = keyFor(library + ".BUILDABLE"); + t << "\t\t" << build_key << " = {" << "\n" + << "\t\t\t" << writeSettings("fileRef", key) << ";" << "\n" + << "\t\t\t" << writeSettings("isa", "PBXBuildFile", SettingsNoQuote) << ";" << "\n" + << "\t\t" << "};" << "\n"; + project->values("QMAKE_PBX_BUILD_LIBRARIES").append(build_key); + } } if(remove) tmp.removeAt(x); -- cgit v1.2.3 From 3cc738dfc79cca0cf415184ab1db0cc7a1c069d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 5 Dec 2012 13:33:59 +0100 Subject: qmake: Don't treat .xcodeproj directories as OUT_PWD when passed with -o The Xcode generator creates a makefile for running 'make qmake', and the makefile passes -o to ensure it writes to the same Xcode project. This fails when qmake then treats -o foo.xcodeproj/project.xcproj as not only setting the output filename, but also the output directory to foo.xcodeproj, which results in the Xcode project trying to reference files relative to this directory, such as '../main.cpp'. Unfortunatly the output filename parsing happens too early for us to know whether or not the generator is Xcode, so we just have to assume that a certain combination of output filename and directories means we are generating an Xcode project. Change-Id: I0901d4db995f287c35cbbbd015683d5abda6d0f5 Reviewed-by: Richard Moe Gustavsen --- qmake/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qmake') diff --git a/qmake/main.cpp b/qmake/main.cpp index 5f9fb05449..6ef0707da9 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -116,6 +116,11 @@ int runQMake(int argc, char **argv) if(!tmp_dir.isEmpty() && QFile::exists(tmp_dir)) dir = tmp_dir; } +#ifdef Q_OS_MAC + if (fi.fileName().endsWith(QStringLiteral(".pbxproj")) + && dir.endsWith(QStringLiteral(".xcodeproj"))) + dir += QStringLiteral("/.."); +#endif if(!dir.isNull() && dir != ".") Option::output_dir = dir; if(QDir::isRelativePath(Option::output_dir)) -- cgit v1.2.3 From 0e548b585695f4bcfaaccf289da8124c851d6d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 7 Jan 2013 16:05:21 +0100 Subject: qmake: Use PBXResourcesBuildPhase for QMAKE_BUNDLE_DATA without a path The PBXResourcesBuildPhase will optimize resources, such as turning XIB files into NIB files, running pngcrush on images, turning string files into binary plists, etc, so we prefer that if possible. Unfortunatly this phase does not support custom paths, so whenever we encounter bundle data with a custom path we fall back to the regular PBXCopyFilesBuildPhase. Change-Id: I539db03dd7982fd37293123b6428cdb695f64d2b Reviewed-by: Richard Moe Gustavsen --- qmake/generators/mac/pbuilder_pbx.cpp | 100 +++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 43 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 87085318bc..d0b7efaca6 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -993,24 +993,6 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";" << "\n" << "\t\t" << "};" << "\n"; } - if(project->isActiveConfig("app_bundle") && project->first("TEMPLATE") == "app") { //BUNDLE RESOURCES - QString grp("Bundle Resources"), key = keyFor(grp); - project->values("QMAKE_PBX_BUILDPHASES").append(key); - t << "\t\t" << key << " = {" << "\n" - << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << "files = (" << "\n"; - if(!project->isEmpty("ICON")) { - ProString icon = project->first("ICON"); - if (icon.length() >= 2 && (icon.at(0) == '"' || icon.at(0) == '\'') && icon.endsWith(icon.at(0))) - icon = icon.mid(1, icon.length()-2); - t << "\t\t\t\t" << keyFor(icon + ".BUILDABLE") << ",\n"; - } - t << "\t\t\t" << ");" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXResourcesBuildPhase", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";" << "\n" - << "\t\t" << "};" << "\n"; - } if (!project->isEmpty("DESTDIR")) { QString phase_key = keyFor("QMAKE_PBX_TARGET_COPY_PHASE"); QString destDir = project->first("DESTDIR").toQString(); @@ -1029,55 +1011,87 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t\t" << writeSettings("shellScript", fixForOutput("cp -r $BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME " + escapeFilePath(destDir))) << ";" << "\n" << "\t\t" << "};\n"; } - //BUNDLE_DATA BUILDPHASE (copy) - if(!project->isEmpty("QMAKE_BUNDLE_DATA")) { + // Copy Bundle Resources + if (!project->isEmpty("QMAKE_BUNDLE_DATA")) { ProStringList bundle_file_refs; + ProStringList bundle_resources_files; + + bool useCopyResourcesPhase = project->isActiveConfig("app_bundle") && project->first("TEMPLATE") == "app"; + //all bundle data const ProStringList &bundle_data = project->values("QMAKE_BUNDLE_DATA"); for(int i = 0; i < bundle_data.count(); i++) { - ProStringList pbx_files; + ProStringList bundle_files; + ProString path = project->first(ProKey(bundle_data[i] + ".path")); //all files const ProStringList &files = project->values(ProKey(bundle_data[i] + ".files")); for(int file = 0; file < files.count(); file++) { QString fn = files[file].toQString(); - QString file_ref_key = keyFor("QMAKE_PBX_BUNDLE_COPY_FILE_REF." + bundle_data[i] + "-" + fn); + QString file_ref_key = keyFor("QMAKE_PBX_BUNDLE_DATA_FILE_REF." + bundle_data[i] + "-" + fn); bundle_file_refs += file_ref_key; t << "\t\t" << file_ref_key << " = {" << "\n" << "\t\t\t" << writeSettings("isa", "PBXFileReference", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("path", escapeFilePath(fn)) << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", sourceTreeForFile(fn)) << ";" << "\n" << "\t\t" << "};" << "\n"; - QString copy_file_key = keyFor("QMAKE_PBX_BUNDLE_COPY_FILE." + bundle_data[i] + "-" + fn); - pbx_files += copy_file_key; - t << "\t\t" << copy_file_key << " = {\n" + QString file_key = keyFor("QMAKE_PBX_BUNDLE_DATA_FILE." + bundle_data[i] + "-" + fn); + bundle_files += file_key; + t << "\t\t" << file_key << " = {\n" << "\t\t\t" << writeSettings("fileRef", file_ref_key) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXBuildFile", SettingsNoQuote) << ";" << "\n" << "\t\t" << "}" << ";" << "\n"; } - //the phase - QString phase_key = keyFor("QMAKE_PBX_BUNDLE_COPY." + bundle_data[i]); - QString path; - if (!project->isEmpty(ProKey(bundle_data[i] + ".version"))) { - //### + + if (!useCopyResourcesPhase || !path.isEmpty()) { + // The resource copy phase doesn't support paths, so we have to use + // a regular file copy phase (which doesn't optimize the resources). + QString phase_key = keyFor("QMAKE_PBX_BUNDLE_COPY." + bundle_data[i]); + if (!project->isEmpty(ProKey(bundle_data[i] + ".version"))) { + //### + } + + project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES").append(phase_key); + t << "\t\t" << phase_key << " = {\n" + << "\t\t\t" << writeSettings("name", "Copy '" + bundle_data[i] + "' Files to Bundle") << ";" << "\n" + << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("dstPath", escapeFilePath(path)) << ";" << "\n" + << "\t\t\t" << writeSettings("dstSubfolderSpec", "1", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("files", bundle_files, SettingsAsList, 4) << ";" << "\n" + << "\t\t\t" << writeSettings("isa", "PBXCopyFilesBuildPhase", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" + << "\t\t" << "}" << ";" << "\n"; + } else { + // Otherwise we leave it to the resource copy phase below + bundle_resources_files += bundle_files; + } + } + + if (useCopyResourcesPhase) { + if (!project->isEmpty("ICON")) { + ProString icon = project->first("ICON"); + if (icon.length() >= 2 && (icon.at(0) == '"' || icon.at(0) == '\'') && icon.endsWith(icon.at(0))) { + icon = icon.mid(1, icon.length() - 2); + bundle_resources_files += keyFor(icon + ".BUILDABLE"); + } } - path += project->first(ProKey(bundle_data[i] + ".path")); - project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES").append(phase_key); - t << "\t\t" << phase_key << " = {\n" - << "\t\t\t" << writeSettings("name", "Bundle Copy [" + bundle_data[i] + "]") << ";" << "\n" + + QString grp("Copy Bundle Resources"), key = keyFor(grp); + project->values("QMAKE_PBX_BUILDPHASES").append(key); + t << "\t\t" << key << " = {" << "\n" << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("dstPath", escapeFilePath(path)) << ";" << "\n" - << "\t\t\t" << writeSettings("dstSubfolderSpec", "1", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("files", pbx_files, SettingsAsList, 4) << ";" << "\n" - << "\t\t\t" << writeSettings("isa", "PBXCopyFilesBuildPhase", SettingsNoQuote) << ";" << "\n" + << "\t\t\t" << writeSettings("files", bundle_resources_files, SettingsAsList, 4) << ";" << "\n" + << "\t\t\t" << writeSettings("isa", "PBXResourcesBuildPhase", SettingsNoQuote) << ";" << "\n" << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";" << "\n" - << "\t\t" << "}" << ";" << "\n"; + << "\t\t\t" << writeSettings("name", escapeFilePath(grp)) << ";" << "\n" + << "\t\t" << "};" << "\n"; } - QString bundle_copy_key = keyFor("QMAKE_PBX_BUNDLE_COPY"); - project->values("QMAKE_PBX_GROUPS").append(bundle_copy_key); - t << "\t\t" << bundle_copy_key << " = {" << "\n" + + QString bundle_data_key = keyFor("QMAKE_PBX_BUNDLE_DATA"); + project->values("QMAKE_PBX_GROUPS").append(bundle_data_key); + t << "\t\t" << bundle_data_key << " = {" << "\n" << "\t\t\t" << writeSettings("children", bundle_file_refs, SettingsAsList, 4) << ";" << "\n" << "\t\t\t" << writeSettings("isa", "PBXGroup", SettingsNoQuote) << ";" << "\n" - << "\t\t\t" << writeSettings("name", "Source [bundle data]") << ";" << "\n" + << "\t\t\t" << writeSettings("name", "Bundle Resources") << ";" << "\n" << "\t\t\t" << writeSettings("sourceTree", "") << ";" << "\n" << "\t\t" << "};" << "\n"; } -- cgit v1.2.3 From f6d13a45c88d94a7b616450efe1adb0a231a92c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sat, 22 Dec 2012 19:57:10 +0100 Subject: qmake: Prevent Obj-C sources from building both as extra compiler and in Xcode We already assume that if a source is buildable and should end up in OBJECTS we can let Xcode build it, so we skip this input for the extra compiler. Change-Id: I17b2408925b8e6513f0fa0d2459ec539bf7381d3 Reviewed-by: Richard Moe Gustavsen Reviewed-by: Oswald Buddenhagen --- qmake/generators/mac/pbuilder_pbx.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index d0b7efaca6..4710f7e939 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -557,10 +557,13 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) { if (project->isEmpty(ProKey(*it + ".output"))) continue; - const ProStringList &inputs = project->values(ProKey(*it + ".input")); - for(int input = 0; input < inputs.size(); ++input) { - if (project->isEmpty(inputs.at(input).toKey())) + ProStringList &inputs = project->values(ProKey(*it + ".input")); + int input = 0; + while (input < inputs.size()) { + if (project->isEmpty(inputs.at(input).toKey())) { + ++input; continue; + } bool duplicate = false; bool isObj = project->values(ProKey(*it + ".CONFIG")).indexOf("no_link") == -1; if (!isObj) { @@ -581,7 +584,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } sources.append(ProjectBuilderSources(inputs.at(input).toQString(), true, QString(), (*it).toQString(), isObj)); + + if (isObj) { + inputs.removeAt(input); + continue; + } } + + ++input; } } } -- cgit v1.2.3 From dd5b437d6a9b509466021c9484cc396bbdf0f1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 11 Dec 2012 16:46:55 +0100 Subject: qmake: Fix file paths in Xcode projects when shadow-building The Xcode generator seems to have been written with the assumption that writeMakeParts() would be called with the output directory as the current directory, but that's not the case when shadow-building. Perhaps this was changed in qmake at some point, and the Xcode generator was not updated to reflect that. Instead of replacing every occurance of fileFixify and other logic to deal with paths, we just chdir into the output_dir for the duration of the function (except when writing the 'make qmake' makefile, as the regular makefile generator works as expected with the current directory set to the input directory). Change-Id: I6ba492036d73f29f4adbd7cd554db9504050629e Reviewed-by: Richard Moe Gustavsen --- qmake/generators/mac/pbuilder_pbx.cpp | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 4710f7e939..41af3d2a53 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -453,7 +453,6 @@ ProjectBuilderSources::files(QMakeProject *project) const { QStringList ret = project->values(ProKey(key)).toQStringList(); if(key == "QMAKE_INTERNAL_INCLUDED_FILES") { - ret.prepend(project->projectFile()); for(int i = 0; i < ret.size(); ++i) { QStringList newret; if(!ret.at(i).endsWith(Option::prf_ext)) @@ -500,6 +499,14 @@ static QString xcodeFiletypeForFilename(const QString &filename) bool ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) { + // The code in this function assumes that the current directory matches + // the output directory, which is not actually the case when we are called + // from the generic generator code. Instead of changing every single + // assumption and fileFixify we cheat by moving into the output directory + // for the duration of this function. + QString input_dir = qmake_getpwd(); + qmake_setpwd(Option::output_dir); + ProStringList tmp; bool did_preprocess = false; @@ -521,6 +528,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) QFile mkf(mkfile); if(mkf.open(QIODevice::WriteOnly | QIODevice::Text)) { writingUnixMakefileGenerator = true; + qmake_setpwd(input_dir); // Makefile generation assumes input_dir as pwd debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData()); QTextStream mkt(&mkf); writeHeader(mkt); @@ -529,6 +537,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) mkt.flush(); mkf.close(); writingUnixMakefileGenerator = false; + qmake_setpwd(Option::output_dir); } QString phase_key = keyFor("QMAKE_PBX_MAKEQMAKE_BUILDPHASE"); mkfile = fileFixify(mkfile, qmake_getpwd()); @@ -544,6 +553,10 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) << "\t\t" << "};" << "\n"; } + // FIXME: Move all file resolving logic out of ProjectBuilderSources::files(), as it + // doesn't have access to any of the information it needs to resolve relative paths. + project->values("QMAKE_INTERNAL_INCLUDED_FILES").prepend(fileFixify(project->projectFile(), qmake_getpwd(), input_dir)); + //DUMP SOURCES QMap groups; QList sources; @@ -1463,6 +1476,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) writingUnixMakefileGenerator = false; } } + + qmake_setpwd(input_dir); + return true; } @@ -1676,10 +1692,9 @@ ProjectBuilderMakefileGenerator::reftypeForFile(const QString &where) QString ProjectBuilderMakefileGenerator::sourceTreeForFile(const QString &where) { - QString ret = ""; - if (QDir::isRelativePath(unescapeFilePath(where))) - ret = "SOURCE_ROOT"; //relative - return ret; + // We always use absolute paths, instead of maintaining the SRCROOT + // build variable and making files relative to that. + return QLatin1String(""); } QString -- cgit v1.2.3 From de5553aad52f8a8343d53bac5e9d29bcd67fbf2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 19 Nov 2012 14:58:10 +0100 Subject: qmake: Resolve QMAKE_INFO_PLIST against current working dir We're not in the output directory yet, so resolving using vanilla fileFixify will end up failing when we check if the file exists, since QFileInfo resolves relative paths against the current directory. Change-Id: I414c6a2e83b49e3fb30e6153a49f7a90a8e528a0 Reviewed-by: Oswald Buddenhagen --- qmake/generators/unix/unixmake2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 41e40e0bb6..8ad603580c 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -1218,7 +1218,7 @@ void UnixMakefileGenerator::init2() } if(!project->isEmpty("QMAKE_BUNDLE")) { - QString plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString()); + QString plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString(), qmake_getpwd()); if(plist.isEmpty()) plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE"); if(exists(Option::fixPathToLocalOS(plist))) { -- cgit v1.2.3 From a6286039babdd3680124c9449d14911ed29b2295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 21 Nov 2012 14:49:47 +0100 Subject: iOS: Write default code signing identify for iOS in Xcode generator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic04da6063863585665c9133caba0279ba478fbb4 Reviewed-by: Oswald Buddenhagen Reviewed-by: Ian Dean Reviewed-by: Morten Johan Sørvig --- qmake/generators/mac/pbuilder_pbx.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qmake') diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 41af3d2a53..923639d89d 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -1355,6 +1355,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) if (!project->isEmpty("QMAKE_IOS_DEPLOYMENT_TARGET")) t << "\t\t\t\t" << writeSettings("IPHONEOS_DEPLOYMENT_TARGET", project->first("QMAKE_IOS_DEPLOYMENT_TARGET")) << ";" << "\n"; + if (!project->isEmpty("QMAKE_XCODE_CODE_SIGN_IDENTITY")) + t << "\t\t\t\t" << writeSettings("CODE_SIGN_IDENTITY", project->first("QMAKE_XCODE_CODE_SIGN_IDENTITY")) << ";" << "\n"; + tmp = project->values("QMAKE_PBX_VARS"); for (int i = 0; i < tmp.count(); i++) { QString var = tmp[i].toQString(), val = QString::fromLocal8Bit(qgetenv(var.toLatin1().constData())); -- cgit v1.2.3 From 1c061b4bccbdcfe90b186e8e469d70dac7281a72 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 30 Jan 2013 15:58:00 +0100 Subject: introduce QMAKE_LINK_O_FLAG this makes it possible to properly parametrize alternative linkers. Change-Id: Ia9cf574544a0259975470366d278b6c5dc747906 Reviewed-by: Eskil Abrahamsen Blomfeldt --- qmake/generators/makefile.cpp | 3 +++ qmake/generators/unix/unixmake2.cpp | 8 ++++---- qmake/generators/win32/mingw_make.cpp | 2 +- qmake/generators/win32/msvc_nmake.cpp | 7 +++++-- 4 files changed, 13 insertions(+), 7 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index b001fd930b..9ab9a9adea 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -448,6 +448,9 @@ MakefileGenerator::init() if (chkglue.isEmpty()) // Backwards compat with Qt4 specs chkglue = isWindowsShell() ? "" : "|| "; + if (v["QMAKE_LINK_O_FLAG"].isEmpty()) + v["QMAKE_LINK_O_FLAG"].append("-o "); + ProStringList &quc = v["QMAKE_EXTRA_COMPILERS"]; //make sure the COMPILERS are in the correct input/output chain order diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 8ad603580c..2dfe16dbfc 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -436,7 +436,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t"; if(!project->isEmpty("QMAKE_PRE_LINK")) t << var("QMAKE_PRE_LINK") << "\n\t"; - t << "$(LINK) $(LFLAGS) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS)"; + t << "$(LINK) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS)"; if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" << var("QMAKE_POST_LINK"); t << endl << endl; @@ -451,7 +451,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << mkdir_p_asstring(destdir) << "\n\t"; if (!project->isEmpty("QMAKE_PRE_LINK")) t << var("QMAKE_PRE_LINK") << "\n\t"; - t << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)"; + t << "$(LINK) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)"; if (!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" << var("QMAKE_POST_LINK"); } @@ -503,7 +503,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)" << "\n\t"; if(!destdir.isEmpty()) t << mkdir_p_asstring(destdir) << "\n\t"; - t << "$(LINK) " << incr_lflags << " -o "<< incr_target_dir << + t << "$(LINK) " << incr_lflags << " " << var("QMAKE_LINK_O_FLAG") << incr_target_dir << " $(INCREMENTAL_OBJECTS)" << endl; //communicated below ProStringList &cmd = project->values("QMAKE_LINK_SHLIB_CMD"); @@ -1173,7 +1173,7 @@ void UnixMakefileGenerator::init2() } if (project->values("QMAKE_LINK_SHLIB_CMD").isEmpty()) project->values("QMAKE_LINK_SHLIB_CMD").append( - "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)"); + "$(LINK) $(LFLAGS) " + project->first("QMAKE_LINK_O_FLAG") + "$(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP)"); } if (!project->values("QMAKE_APP_FLAG").isEmpty()) { project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_APP"); diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 06e25c29f3..2e0a724c02 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -405,7 +405,7 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t) t << "\n\t" << objectsLinkLine << " " ; } } else if (project->first("TEMPLATE") != "aux") { - t << "\n\t" << "$(LINKER) $(LFLAGS) -o $(DESTDIR_TARGET) " << objectsLinkLine << " " << " $(LIBS)"; + t << "\n\t" << "$(LINKER) $(LFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) " << objectsLinkLine << " " << " $(LIBS)"; } if(!project->isEmpty("QMAKE_POST_LINK")) t << "\n\t" <values("QMAKE_LFLAGS").append("/VERSION:" + major + "." + minor); } + if (project->isEmpty("QMAKE_LINK_O_FLAG")) + project->values("QMAKE_LINK_O_FLAG").append("/OUT:"); + // Base class init! MakefileGenerator::init(); @@ -377,7 +380,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) if(!project->isEmpty("QMAKE_PRE_LINK")) t << "\n\t" <isActiveConfig("staticlib")) { - t << "\n\t" << "$(LIBAPP) $(LIBFLAGS) /OUT:$(DESTDIR_TARGET) @<<" << "\n\t " + t << "\n\t" << "$(LIBAPP) $(LIBFLAGS) " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<" << "\n\t " << "$(OBJECTS)" << "\n<<"; } else if (templateName != "aux") { @@ -459,7 +462,7 @@ void NmakeMakefileGenerator::writeLinkCommand(QTextStream &t, const QString &ext t << "$(LINKER) $(LFLAGS)"; if (!extraFlags.isEmpty()) t << ' ' << extraFlags; - t << " /OUT:$(DESTDIR_TARGET) @<<\n" + t << " " << var("QMAKE_LINK_O_FLAG") << "$(DESTDIR_TARGET) @<<\n" << "$(OBJECTS) $(LIBS)"; if (!extraInlineFileContent.isEmpty()) t << ' ' << extraInlineFileContent; -- cgit v1.2.3 From c6a689f64fa4d2db55206ef7d63baebdf4c7befd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 6 Mar 2013 14:53:36 +0100 Subject: Make .prl file generation work for iOS again. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit d28073d9 creates a distinction between "mac" and "macx". The latter is not set on iOS, which caused MakefileGenerator::target_mode to be set to TARG_UNIX_MODE. Check for the "mac" active config instead of "macx". Rename TARG_MACX_MODE -> TARG_MAC_MODE. Change-Id: I7192788c33f5723034ba76da2492379dd454f0ab Reviewed-by: Oswald Buddenhagen Reviewed-by: Tor Arne Vestbø --- qmake/generators/makefile.cpp | 6 +++--- qmake/generators/makefile.h | 2 +- qmake/generators/unix/unixmake.cpp | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index a75149b926..3cac073d72 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -305,8 +305,8 @@ MakefileGenerator::setProjectFile(QMakeProject *p) project = p; if (project->isActiveConfig("win32")) target_mode = TARG_WIN_MODE; - else if (project->isActiveConfig("macx")) - target_mode = TARG_MACX_MODE; + else if (project->isActiveConfig("mac")) + target_mode = TARG_MAC_MODE; else target_mode = TARG_UNIX_MODE; init(); @@ -3236,7 +3236,7 @@ MakefileGenerator::writePkgConfigFile() t << "Libs: "; QString pkgConfiglibDir; QString pkgConfiglibName; - if (target_mode == TARG_MACX_MODE && project->isActiveConfig("lib_bundle")) { + if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle")) { pkgConfiglibDir = "-F${libdir}"; ProString bundle; if (!project->isEmpty("QMAKE_FRAMEWORK_BUNDLE_NAME")) diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 2f3e73ff6b..e1447c61c3 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -90,7 +90,7 @@ class MakefileGenerator : protected QMakeSourceFileInfo mutable QHash extraCompilerVariablesCache; protected: - enum TARG_MODE { TARG_UNIX_MODE, TARG_MACX_MODE, TARG_WIN_MODE } target_mode; + enum TARG_MODE { TARG_UNIX_MODE, TARG_MAC_MODE, TARG_WIN_MODE } target_mode; ProStringList createObjectList(const ProStringList &sources); diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index da0da53e05..7ebb397fba 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -493,7 +493,7 @@ UnixMakefileGenerator::findLibraries() } else { stub = opt.mid(2); } - } else if (target_mode == TARG_MACX_MODE && opt.startsWith("-framework")) { + } else if (target_mode == TARG_MAC_MODE && opt.startsWith("-framework")) { if (opt.length() == 10) ++it; // Skip @@ -607,11 +607,11 @@ UnixMakefileGenerator::processPrlFiles() break; } } - } else if (target_mode == TARG_MACX_MODE && opt.startsWith("-F")) { + } else if (target_mode == TARG_MAC_MODE && opt.startsWith("-F")) { QMakeLocalFileName f(opt.right(opt.length()-2)); if(!frameworkdirs.contains(f)) frameworkdirs.insert(fwidx++, f); - } else if (target_mode == TARG_MACX_MODE && opt.startsWith("-framework")) { + } else if (target_mode == TARG_MAC_MODE && opt.startsWith("-framework")) { if(opt.length() > 11) opt = opt.mid(11); else @@ -650,7 +650,7 @@ UnixMakefileGenerator::processPrlFiles() ProKey arch("default"); ProString opt = l.at(lit).trimmed(); if(opt.startsWith("-")) { - if (target_mode == TARG_MACX_MODE && opt.startsWith("-Xarch")) { + if (target_mode == TARG_MAC_MODE && opt.startsWith("-Xarch")) { if (opt.length() > 7) { arch = opt.mid(7).toKey(); opt = l.at(++lit); @@ -658,7 +658,7 @@ UnixMakefileGenerator::processPrlFiles() } if (opt.startsWith(libArg) || - (target_mode == TARG_MACX_MODE && opt.startsWith("-F"))) { + (target_mode == TARG_MAC_MODE && opt.startsWith("-F"))) { if(!lflags[arch].contains(opt)) lflags[arch].append(opt); } else if(opt.startsWith("-l") || opt == "-pthread") { @@ -666,12 +666,12 @@ UnixMakefileGenerator::processPrlFiles() if (lflags[arch].contains(opt)) lflags[arch].removeAll(opt); lflags[arch].append(opt); - } else if (target_mode == TARG_MACX_MODE && opt.startsWith("-framework")) { + } else if (target_mode == TARG_MAC_MODE && opt.startsWith("-framework")) { if(opt.length() > 11) opt = opt.mid(11); else { opt = l.at(++lit); - if (target_mode == TARG_MACX_MODE && opt.startsWith("-Xarch")) + if (target_mode == TARG_MAC_MODE && opt.startsWith("-Xarch")) opt = l.at(++lit); // The user has done the right thing and prefixed each part } bool found = false; @@ -833,7 +833,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t) uninst.append("-$(DEL_FILE) \"" + dst_targ + "\""); if(!links.isEmpty()) { for(int i = 0; i < links.size(); ++i) { - if (target_mode == TARG_UNIX_MODE || target_mode == TARG_MACX_MODE) { + if (target_mode == TARG_UNIX_MODE || target_mode == TARG_MAC_MODE) { QString link = Option::fixPathToTargetOS(destdir + links[i], false); int lslash = link.lastIndexOf(Option::dir_sep); if(lslash != -1) -- cgit v1.2.3 From 0dedf8c3403923b963c51eb65d9cbe838d5ba0d4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 5 Mar 2013 11:32:15 +0100 Subject: remove pointless initialization of qmakespec we have proper fallback paths further down the line. Change-Id: I3648cc985d21bbec4c2c24e179830db4467af210 Reviewed-by: Joerg Bornemann --- qmake/library/qmakeglobals.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'qmake') diff --git a/qmake/library/qmakeglobals.cpp b/qmake/library/qmakeglobals.cpp index ac9a0856ff..42bb85bb02 100644 --- a/qmake/library/qmakeglobals.cpp +++ b/qmake/library/qmakeglobals.cpp @@ -115,7 +115,6 @@ QMakeGlobals::QMakeGlobals() dirlist_sep = QLatin1Char(':'); dir_sep = QLatin1Char('/'); #endif - qmakespec = getEnv(QLatin1String("QMAKESPEC")); } QMakeGlobals::~QMakeGlobals() -- cgit v1.2.3 From 525eb337670f61078383c20ad9be274dcf2d0928 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 5 Mar 2013 12:35:05 +0100 Subject: permit returning from files this allows skipping an entire feature file if a condition is not fulfilled, without putting the whole body inside a conditional. Change-Id: I84fe9c94dda58c794fb52c3f163b40563b0db30a Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- qmake/library/qmakeparser.cpp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'qmake') diff --git a/qmake/library/qmakeparser.cpp b/qmake/library/qmakeparser.cpp index f32267cf59..557a779717 100644 --- a/qmake/library/qmakeparser.cpp +++ b/qmake/library/qmakeparser.cpp @@ -1024,7 +1024,6 @@ void QMakeParser::finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int arg m_tmp.setRawData((QChar *)uc + 4, nlen); const QString *defName; ushort defType; - uchar nest; if (m_tmp == statics.strfor) { if (m_invert || m_operator == OrOperator) { // '|' could actually work reasonably, but qmake does nonsense here. @@ -1101,13 +1100,20 @@ void QMakeParser::finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int arg parseError(fL1S("%1(function) requires one literal argument.").arg(*defName)); return; } else if (m_tmp == statics.strreturn) { - if (argc > 1) { - parseError(fL1S("return() requires zero or one argument.")); - bogusTest(tokPtr); - return; + if (m_blockstack.top().nest & NestFunction) { + if (argc > 1) { + parseError(fL1S("return() requires zero or one argument.")); + bogusTest(tokPtr); + return; + } + } else { + if (*uce != TokFuncTerminator) { + parseError(fL1S("Top-level return() requires zero arguments.")); + bogusTest(tokPtr); + return; + } } defType = TokReturn; - nest = NestFunction; goto ctrlstm2; } else if (m_tmp == statics.strnext) { defType = TokNext; @@ -1120,15 +1126,14 @@ void QMakeParser::finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int arg bogusTest(tokPtr); return; } - nest = NestLoop; - ctrlstm2: - if (m_invert) { - parseError(fL1S("Unexpected NOT operator in front of %1().").arg(m_tmp)); + if (!(m_blockstack.top().nest & NestLoop)) { + parseError(fL1S("Unexpected %1().").arg(m_tmp)); bogusTest(tokPtr); return; } - if (!(m_blockstack.top().nest & nest)) { - parseError(fL1S("Unexpected %1().").arg(m_tmp)); + ctrlstm2: + if (m_invert) { + parseError(fL1S("Unexpected NOT operator in front of %1().").arg(m_tmp)); bogusTest(tokPtr); return; } -- cgit v1.2.3 From 6c22b9b3e86d1617665f7b81b105c032f43c6d72 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 7 Mar 2013 21:47:42 +0100 Subject: make split_value_list() sane don't count parentheses, don't nest quotes, don't create empty elements, let backslash uniformly escape. in short, behave like a sane parser. Change-Id: I29252fbe14fd6d28217450ec41cf8acfb2e30681 Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- qmake/library/qmakeevaluator.cpp | 64 +++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 31 deletions(-) (limited to 'qmake') diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index ad168774bc..285c79b9f3 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -264,48 +264,50 @@ ProStringList QMakeEvaluator::split_value_list(const QString &vals, const ProFil { QString build; ProStringList ret; - QStack quote; - - const ushort SPACE = ' '; - const ushort LPAREN = '('; - const ushort RPAREN = ')'; - const ushort SINGLEQUOTE = '\''; - const ushort DOUBLEQUOTE = '"'; - const ushort BACKSLASH = '\\'; if (!source) source = currentProFile(); - ushort unicode; const QChar *vals_data = vals.data(); const int vals_len = vals.length(); - int parens = 0; + ushort quote = 0; + bool hadWord = false; for (int x = 0; x < vals_len; x++) { - unicode = vals_data[x].unicode(); - if (x != (int)vals_len-1 && unicode == BACKSLASH && - (vals_data[x+1].unicode() == SINGLEQUOTE || vals_data[x+1].unicode() == DOUBLEQUOTE)) { - build += vals_data[x++]; //get that 'escape' - } else if (!quote.isEmpty() && unicode == quote.top()) { - quote.pop(); - } else if (unicode == SINGLEQUOTE || unicode == DOUBLEQUOTE) { - quote.push(unicode); - } else if (unicode == RPAREN) { - --parens; - } else if (unicode == LPAREN) { - ++parens; + ushort unicode = vals_data[x].unicode(); + if (unicode == quote) { + quote = 0; + continue; } - - if (!parens && quote.isEmpty() && vals_data[x] == SPACE) { - ret << ProString(build).setSource(source); - build.clear(); - } else { - build += vals_data[x]; + switch (unicode) { + case '"': + case '\'': + quote = unicode; + hadWord = true; + continue; + case ' ': + case '\t': + if (!quote) { + if (hadWord) { + ret << ProString(build).setSource(source); + build.clear(); + hadWord = false; + } + continue; + } + build += QChar(unicode); + break; + case '\\': + if (x + 1 != vals_len) + unicode = vals_data[++x].unicode(); + // fallthrough + default: + hadWord = true; + build += QChar(unicode); + break; } } - if (!build.isEmpty()) + if (hadWord) ret << ProString(build).setSource(source); - if (parens) - deprecationWarning(fL1S("Unmatched parentheses are deprecated.")); return ret; } -- cgit v1.2.3 From a5c2ab47867a558d6f8f62126fb8e4f2777cfe06 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Mar 2013 21:56:56 +0100 Subject: make split_value_list() a bit less sane again let the backslash escape only quotes (and itself), after all - $$list() (one of the main users of this function) is commonly used with (windows) path lists, so letting it escape anything would make a royal mess. Change-Id: I2dae2e4508903e62c190c1497da68d53978118e7 Reviewed-by: Joerg Bornemann --- qmake/library/qmakeevaluator.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'qmake') diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index 285c79b9f3..4f4e5854f1 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -297,8 +297,13 @@ ProStringList QMakeEvaluator::split_value_list(const QString &vals, const ProFil build += QChar(unicode); break; case '\\': - if (x + 1 != vals_len) - unicode = vals_data[++x].unicode(); + if (x + 1 != vals_len) { + ushort next = vals_data[++x].unicode(); + if (next == '\'' || next == '"' || next == '\\') + unicode = next; + else + --x; + } // fallthrough default: hadWord = true; -- cgit v1.2.3 From bd7ca33889139782f3f0063f93ca9c1f39501a17 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 6 Dec 2012 19:53:17 +0100 Subject: qfilesystemengine_mac.cpp is empty => purge Change-Id: I61c615343f45fe52adee36b6822322bda2b2ca4f Reviewed-by: Joerg Bornemann --- qmake/Makefile.unix | 4 ---- qmake/qmake.pri | 1 - 2 files changed, 5 deletions(-) (limited to 'qmake') diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index e4bb27c557..7293f4c869 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -48,7 +48,6 @@ DEPEND_SRC = \ $(SOURCE_PATH)/src/corelib/io/qdatastream.cpp $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp \ $(SOURCE_PATH)/src/corelib/io/qfilesystementry.cpp \ $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp \ - $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_mac.cpp \ $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_win.cpp \ $(SOURCE_PATH)/src/corelib/io/qfilesystemengine.cpp \ $(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp \ @@ -301,9 +300,6 @@ qfilesystemengine.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine.cpp qfilesystemengine_unix.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp -qfilesystemengine_mac.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_mac.cpp - $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_mac.cpp - qfilesystemengine_win.o: $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_win.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfilesystemengine_win.cpp diff --git a/qmake/qmake.pri b/qmake/qmake.pri index aff0a9efda..66f7964c5f 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -131,7 +131,6 @@ bootstrap { #Qt code unix { SOURCES += qfilesystemengine_unix.cpp qfilesystemiterator_unix.cpp qfsfileengine_unix.cpp mac { - SOURCES += qfilesystemengine_mac.cpp SOURCES += qcore_mac.cpp qsettings_mac.cpp qlocale_mac.mm LIBS += -framework ApplicationServices } else { -- cgit v1.2.3 From be1116fe909a60341f714d5ce0765798a08722e7 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 11 Mar 2013 18:00:34 +0100 Subject: make depend_prl more thorough; introduce fast_depend_prl depend_prl would so far only ensure that the dependency existed, not that it would be up to date. this is of only limited value, so make sure that the dependencies are always updated. as this is somewhat expensive (every dependency's makefile will be entered as many times as it is used, plus one), provide an opt-out by adding fast_depend_prl. Task-number: QTBUG-29486 Change-Id: Ifa2e100bc4c269a403ab620927bfe5c7efe9a435 Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- qmake/generators/unix/unixmake2.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 2dfe16dbfc..400908bc91 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -349,7 +349,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << project->first("QMAKE_EXTENSION_STATICLIB") << " "; t << endl << endl; } - if(project->isActiveConfig("depend_prl") && !project->isEmpty("QMAKE_PRL_INTERNAL_FILES")) { + if ((project->isActiveConfig("depend_prl") || project->isActiveConfig("fast_depend_prl")) + && !project->isEmpty("QMAKE_PRL_INTERNAL_FILES")) { const ProStringList &l = project->values("QMAKE_PRL_INTERNAL_FILES"); ProStringList::ConstIterator it; for(it = l.begin(); it != l.end(); ++it) { @@ -361,8 +362,12 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) dir = (*it).left(slsh + 1); QString targ = dir + libinfo.first("QMAKE_PRL_TARGET"); target_deps += " " + targ; - t << targ << ":" << "\n\t" - << "@echo \"Creating '" << targ << "'\"" << "\n\t" + t << targ; + if (project->isActiveConfig("fast_depend_prl")) + t << ":\n\t@echo \"Creating '"; + else + t << ": FORCE\n\t@echo \"Creating/updating '"; + t << targ << "'\"" << "\n\t" << "(cd " << libinfo.first("QMAKE_PRL_BUILD_DIR") << ";" << "$(MAKE))" << endl; } -- cgit v1.2.3 From ae94bf2b7a6373def9239ae5f54b143e1f6ffe09 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Mar 2013 21:48:12 +0100 Subject: don't send output of $$join() and $$sprintf() through split_value_list() in the case of sprintf it's surprising, in the case of join it's anti-thetical. Change-Id: I4eb7e56d31ac6ed68adf852f1a19b33554d38eb4 Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- qmake/library/qmakebuiltins.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'qmake') diff --git a/qmake/library/qmakebuiltins.cpp b/qmake/library/qmakebuiltins.cpp index f46d66ba89..0dedd64e6e 100644 --- a/qmake/library/qmakebuiltins.cpp +++ b/qmake/library/qmakebuiltins.cpp @@ -467,8 +467,7 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand( QString tmp = args.at(0).toQString(m_tmp1); for (int i = 1; i < args.count(); ++i) tmp = tmp.arg(args.at(i).toQString(m_tmp2)); - // Note: this depends on split_value_list() making a deep copy - ret = split_value_list(tmp); + ret << ProString(tmp); } break; case E_FORMAT_NUMBER: @@ -561,7 +560,7 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand( src = s; break; } - ret = split_value_list(before + var.join(glue) + after, src); + ret << ProString(before + var.join(glue) + after).setSource(src); } } break; -- cgit v1.2.3 From b11317a64339f5a4bcffc8234ecaf15c7fb416f2 Mon Sep 17 00:00:00 2001 From: Axel Waggershauser Date: Fri, 15 Mar 2013 00:42:15 +0100 Subject: Whitespace cleanup: remove trailing whitespace Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen --- qmake/generators/win32/mingw_make.cpp | 2 +- qmake/generators/win32/mingw_make.h | 2 +- qmake/generators/win32/msvc_nmake.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 2e0a724c02..e64b2160b3 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -431,7 +431,7 @@ void MingwMakefileGenerator::writeRcFilePart(QTextStream &t) if (!rc_file.isEmpty()) { t << escapeDependencyPath(var("RES_FILE")) << ": " << rc_file << "\n\t" - << var("QMAKE_RC") << " -i " << rc_file << " -o " << var("RES_FILE") + << var("QMAKE_RC") << " -i " << rc_file << " -o " << var("RES_FILE") << incPathStr << " $(DEFINES)" << endl << endl; } } diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h index 6bdcb7ea70..0e1267994e 100644 --- a/qmake/generators/win32/mingw_make.h +++ b/qmake/generators/win32/mingw_make.h @@ -65,7 +65,7 @@ private: void writeRcFilePart(QTextStream &t); QStringList &findDependencies(const QString &file); - + QString preCompHeaderOut; virtual bool findLibraries(); diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 54dea886af..b620c270e0 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -451,7 +451,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) } } QString signature = !project->isEmpty("SIGNATURE_FILE") ? var("SIGNATURE_FILE") : var("DEFAULT_SIGNATURE"); - bool useSignature = !signature.isEmpty() && !project->isActiveConfig("staticlib") && + bool useSignature = !signature.isEmpty() && !project->isActiveConfig("staticlib") && !project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH"); if(useSignature) { t << "\n\tsigntool sign /F " << signature << " $(DESTDIR_TARGET)"; -- cgit v1.2.3 From d46345a49e6d4d180ea0f763f43a3034574d9e4a Mon Sep 17 00:00:00 2001 From: Laszlo Papp Date: Mon, 18 Mar 2013 12:19:34 +0000 Subject: Add an initial TI linker support for the unix qmake generator Task-number: QTBUG-30215 Change-Id: Ica283e6b7f67563504ed81f4db1c2218fe5e8b8c Reviewed-by: Oswald Buddenhagen --- qmake/generators/unix/unixmake.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 7ebb397fba..4f28321b09 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -142,6 +142,7 @@ UnixMakefileGenerator::init() project->values("QMAKE_L_FLAG") << (project->isActiveConfig("rvct_linker") ? "--userlibpath " : project->isActiveConfig("armcc_linker") ? "-L--userlibpath=" + : project->isActiveConfig("ti_linker") ? "--search_path=" : "-L"); ProStringList ldadd; if(!project->isEmpty("QMAKE_LIBDIR")) { @@ -490,6 +491,8 @@ UnixMakefileGenerator::findLibraries() } else if(opt.startsWith("-l")) { if (project->isActiveConfig("rvct_linker") || project->isActiveConfig("armcc_linker")) { (*it) = "lib" + opt.mid(2) + ".so"; + } else if (project->isActiveConfig("ti_linker")) { + (*it) = opt.mid(2); } else { stub = opt.mid(2); } -- cgit v1.2.3