From 9b68bc4147e1a8e61cbe0b5e318001fd6b76c7be Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 18 Nov 2016 11:42:35 +0100 Subject: move "shared" registry reading code into qmake now that configureapp does not use it any more, qmake is the only remaining user. and the license headers already claimed that this code is part of qmake ... Change-Id: I9b8a16f8f2b432d2b1143efbdd1f0042305ccc0c Reviewed-by: Thiago Macieira --- qmake/Makefile.unix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'qmake/Makefile.unix') diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index aa6c876c73..72431f51ea 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -33,6 +33,7 @@ DEPEND_SRC = \ $(QMKGENSRC)/projectgenerator.cpp $(QMKGENSRC)/makefile.cpp \ $(QMKGENSRC)/unix/unixmake.cpp $(QMKGENSRC)/unix/unixmake2.cpp \ $(QMKGENSRC)/mac/pbuilder_pbx.cpp \ + $(QMKGENSRC)/win32/registry.cpp \ $(QMKGENSRC)/win32/winmakefile.cpp \ $(QMKGENSRC)/win32/mingw_make.cpp $(QMKGENSRC)/win32/msvc_nmake.cpp \ $(QMKGENSRC)/mac/xmloutput.cpp \ @@ -84,7 +85,6 @@ DEPEND_SRC = \ $(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 \ $(SOURCE_PATH)/src/corelib/json/qjson.cpp \ $(SOURCE_PATH)/src/corelib/json/qjsondocument.cpp \ $(SOURCE_PATH)/src/corelib/json/qjsonparser.cpp \ @@ -100,7 +100,6 @@ CPPFLAGS = -g $(EXTRA_CPPFLAGS) \ -I$(INC_PATH)/QtCore/$(QT_VERSION) -I$(INC_PATH)/QtCore/$(QT_VERSION)/QtCore \ -I$(BUILD_PATH)/src/corelib/global \ -I$(QMAKESPEC) \ - -I$(SOURCE_PATH)/tools/shared \ -DQT_VERSION_STR=\"$(QT_VERSION)\" -DQT_VERSION_MAJOR=$(QT_MAJOR_VERSION) -DQT_VERSION_MINOR=$(QT_MINOR_VERSION) -DQT_VERSION_PATCH=$(QT_PATCH_VERSION) \ -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \ -DQT_NO_FOREACH @@ -184,6 +183,9 @@ unixmake.o: $(QMKSRC)/generators/unix/unixmake.cpp unixmake2.o: $(QMKSRC)/generators/unix/unixmake2.cpp $(CXX) -c -o $@ $(CXXFLAGS) $< +registry.o: $(QMKSRC)/generators/win32/registry.cpp + $(CXX) -c -o $@ $(CXXFLAGS) $< + winmakefile.o: $(QMKSRC)/generators/win32/winmakefile.cpp $(CXX) -c -o $@ $(CXXFLAGS) $< @@ -404,9 +406,6 @@ qlogging.o: $(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 - qjson.o: $(SOURCE_PATH)/src/corelib/json/qjson.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/json/qjson.cpp -- cgit v1.2.3 From 52d64fca662d0e488801fc40dffdc0a732cfdbd5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 Jan 2017 16:40:30 +0100 Subject: revert to building qmake with qconfig.cpp turns out that just appending builtin-qt.conf isn't a good idea: executable-editing tools (objcopy, prelink, etc.) will happily drop the "attachment". a safe method would be adding a proper section to the executable, but there doesn't appear to be an objcopy equivalent in msvc, and using entirely different methods of embedding the file with different toolchains seems like a rather bad idea. so instead go back to the old method of building qmake with a generated qconfig.cpp. of course, as said file is now created by qmake itself, we have to compile qlibraryinfo.cpp a second time, and link a second qmake executable. Task-number: QTBUG-57803 Change-Id: I9e232693550aa870cec154e49cc06add13017cc2 Reviewed-by: Lars Knoll --- qmake/Makefile.unix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'qmake/Makefile.unix') diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index 72431f51ea..8eb54f554e 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -16,7 +16,7 @@ QOBJS=qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtext qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.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 \ + qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o \ qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.o qnumeric.o \ qcryptographichash.o qxmlstream.o qxmlutils.o qlogging.o \ qjson.o qjsondocument.o qjsonparser.o qjsonarray.o qjsonobject.o qjsonvalue.o \ @@ -109,19 +109,24 @@ LFLAGS = $(EXTRA_LFLAGS) $(CONFIG_LFLAGS) first all: $(BUILD_PATH)/bin/qmake$(EXEEXT) qmake: $(BUILD_PATH)/bin/qmake$(EXEEXT) +binary: $(BUILD_PATH)/qmake/qmake$(EXEEXT) -$(BUILD_PATH)/bin/qmake$(EXEEXT): $(OBJS) $(QOBJS) - $(CXX) -o "$@" $(OBJS) $(QOBJS) $(LFLAGS) +$(BUILD_PATH)/bin/qmake$(EXEEXT): $(OBJS) $(QOBJS) qlibraryinfo.o + $(CXX) -o "$@" $(OBJS) $(QOBJS) qlibraryinfo.o $(LFLAGS) + +$(BUILD_PATH)/qmake/qmake$(EXEEXT): $(OBJS) $(QOBJS) qlibraryinfo_final.o + $(CXX) -o "$@" $(OBJS) $(QOBJS) qlibraryinfo_final.o $(LFLAGS) Makefile: $(SOURCE_PATH)/qmake/Makefile.unix @echo "Out of date, please rerun configure" clean:: - $(RM_F) $(OBJS) $(QOBJS) + $(RM_F) $(OBJS) $(QOBJS) qlibraryinfo.o qlibraryinfo_final.o distclean:: clean $(RM_RF) .deps $(RM_F) $(BUILD_PATH)/bin/qmake$(EXEEXT) + $(RM_F) $(BUILD_PATH)/qmake/qmake$(EXEEXT) $(RM_F) Makefile depend: @@ -227,6 +232,9 @@ qsystemerror.o: $(SOURCE_PATH)/src/corelib/kernel/qsystemerror.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/kernel/qsystemerror.cpp qlibraryinfo.o: $(SOURCE_PATH)/src/corelib/global/qlibraryinfo.cpp + $(CXX) -c -o $@ $(CXXFLAGS) -DQT_BUILD_QMAKE_BOOTSTRAP $(SOURCE_PATH)/src/corelib/global/qlibraryinfo.cpp + +qlibraryinfo_final.o: $(SOURCE_PATH)/src/corelib/global/qlibraryinfo.cpp $(BUILD_PATH)/src/corelib/global/qconfig.cpp $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qlibraryinfo.cpp qnumeric.o: $(SOURCE_PATH)/src/corelib/global/qnumeric.cpp -- cgit v1.2.3