diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-08-18 12:44:36 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-08-18 12:44:36 (GMT) |
commit | fc58a8bd3c77b83d316a45ddcfd3edba93a4c1e4 (patch) | |
tree | 75ebe5ee35305cacff7b76a9c8ba606f803c85c3 | |
parent | 06524f769fec76fa7ebcc39ac88ac9e08c720677 (diff) | |
download | Qt-fc58a8bd3c77b83d316a45ddcfd3edba93a4c1e4.zip Qt-fc58a8bd3c77b83d316a45ddcfd3edba93a4c1e4.tar.gz Qt-fc58a8bd3c77b83d316a45ddcfd3edba93a4c1e4.tar.bz2 |
Review fixes to qmake
- Removed MWC specific code and makefile
- Added INTERNAL to few qmake variables that were only used internally
Reviewed-by: Janne Koskinen
-rw-r--r-- | qmake/Makefile.win32-mwc | 469 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 44 | ||||
-rw-r--r-- | qmake/generators/makefile.h | 5 | ||||
-rw-r--r-- | qmake/generators/metamakefile.cpp | 3 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake_sbsv2.cpp | 6 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_dsp.cpp | 15 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 23 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 19 | ||||
-rw-r--r-- | qmake/project.cpp | 27 | ||||
-rw-r--r-- | qmake/qmake.pri | 7 | ||||
-rw-r--r-- | qmake/qpopen.cpp | 140 | ||||
-rw-r--r-- | qmake/qpopen.h | 73 |
12 files changed, 17 insertions, 814 deletions
diff --git a/qmake/Makefile.win32-mwc b/qmake/Makefile.win32-mwc deleted file mode 100644 index b3b1b71..0000000 --- a/qmake/Makefile.win32-mwc +++ /dev/null @@ -1,469 +0,0 @@ -ifeq "$(SOURCE_PATH)" "" -SOURCE_PATH = .. -endif - -# cmd version - -ifeq "$(BUILD_PATH)" "" -BUILD_PATH = .. -endif - - -# specific stuff for Metroworks compiler - -CXX = mwccsym2 -CFLAGS = -gccinc \ - -w on -w nonotused -w nonotinlined -w noimplicit -w nopadding -w noemptydecl \ - -w nounusedexpr -w nopossible -c -o $@ -O \ - -I. -Igenerators -Igenerators\unix \ - -Igenerators\win32 -Igenerators\mac \ - -Igenerators\symbian \ - -I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore \ - -I$(SOURCE_PATH)\include -I$(SOURCE_PATH)\include\QtCore \ - -I$(BUILD_PATH)\src\corelib\global \ - -I$(SOURCE_PATH)\mkspecs\win32-mwc \ - -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE \ - -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DHAVE_QCONFIG_CPP \ - -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ - -DQT_NO_LIBRARY -I$(BUILD_PATH)\include\QtScript \ - -I$(SOURCE_PATH)\corelib\xml -DQT_BOOTSTRAPPED - -CXXFLAGS = $(CFLAGS) -LFLAGS = -heapcommit 1024 -heapreserve 102400 -LIBS = -ladvapi32.lib -LINKQMAKE = mwccsym2 $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) -ADDCLEAN = - - -# qmake code -OBJS = project.o main.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 \ - borland_bmake.o msvc_nmake.o msvc_dsp.o msvc_vcproj.o \ - msvc_objectmodel.o initprojectdeploy_symbian.o qpopen.o \ - symmake.o symmake_abld.o symmake_sbsv2.o - -ifdef QMAKE_OPENSOURCE_EDITION -CFLAGS += -DQMAKE_OPENSOURCE_EDITION -endif - -# qt code -QTOBJS= \ - qbitarray.o \ - qbuffer.o \ - qbytearray.o \ - qcryptographichash.o \ - qvsnprintf.o \ - qbytearraymatcher.o \ - qconfig.o \ - qdatetime.o \ - qdir.o \ - qdiriterator.o \ - qfile.o \ - qtemporaryfile.o \ - qfileinfo.o \ - qabstractfileengine.o \ - qfsfileengine.o \ - qfsfileengine_iterator.o \ - qfsfileengine_win.o \ - qfsfileengine_iterator_win.o \ - qglobal.o \ - qhash.o \ - qiodevice.o \ - qlibraryinfo.o \ - qlistdata.o \ - qlinkedlist.o \ - qlocale.o \ - qmalloc.o \ - qmap.o \ - qregexp.o \ - qstring.o \ - qstringlist.o \ - qtextstream.o \ - quuid.o \ - qvector.o \ - qurl.o \ - qsettings.o \ - qsettings_win.o \ - qvariant.o \ - qmetatype.o \ - qnumeric.o \ - qscriptasm.o \ - qscriptast.o \ - qscriptastvisitor.o \ - qscriptcompiler.o \ - qscriptecmaarray.o \ - qscriptecmaboolean.o \ - qscriptecmacore.o \ - qscriptecmadate.o \ - qscriptecmafunction.o \ - qscriptecmaglobal.o \ - qscriptecmamath.o \ - qscriptecmanumber.o \ - qscriptecmaobject.o \ - qscriptecmaregexp.o \ - qscriptecmastring.o \ - qscriptecmaerror.o \ - qscriptcontext_p.o \ - qscriptengine.o \ - qscriptengine_p.o \ - qscriptengineagent.o \ - qscriptextenumeration.o \ - qscriptextvariant.o \ - qscriptcontext.o \ - qscriptcontextinfo.o \ - qscriptfunction.o \ - qscriptgrammar.o \ - qscriptlexer.o \ - qscriptclassdata.o \ - qscriptparser.o \ - qscriptprettypretty.o \ - qscriptsyntaxchecker.o \ - qscriptclass.o \ - qscriptclasspropertyiterator.o \ - qscriptstring.o \ - qscriptvalue.o \ - qscriptvalueimpl.o \ - qscriptvalueiterator.o \ - qscriptvalueiteratorimpl.o \ - qxmlstream.o \ - qxmlutils.o - - -qmake.exe: $(OBJS) $(QTOBJS) - $(LINKQMAKE) - -copy qmake.exe $(BUILD_PATH)\bin\qmake.exe - -Makefile: Makefile.win32-mwc - @echo "Out of date, please rerun configure" - -clean:: - -del $(OBJS) $(QTOBJS) $(ADDCLEAN) - -distclean:: clean - -del qmake.exe - -del $(BUILD_PATH)\bin\qmake.exe - -.c.o: - $(CXX) $(CFLAGS) $< - -.cpp.o: - $(CXX) $(CXXFLAGS) $< - -qconfig.o: $(BUILD_PATH)/src/corelib/global/qconfig.cpp - $(CXX) $(CXXFLAGS) $(BUILD_PATH)/src/corelib/global/qconfig.cpp - -qsettings_win.o: $(SOURCE_PATH)/src/corelib/io/qsettings_win.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qsettings_win.cpp - -qsettings.o: $(SOURCE_PATH)/src/corelib/io/qsettings.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qsettings.cpp - -qvariant.o: $(SOURCE_PATH)/src/corelib/kernel/qvariant.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/kernel/qvariant.cpp - -qurl.o: $(SOURCE_PATH)/src/corelib/io/qurl.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qurl.cpp - -qtextstream.o: $(SOURCE_PATH)/src/corelib/io/qtextstream.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qtextstream.cpp - -qdatastream.o: $(SOURCE_PATH)/src/corelib/io/qdatastream.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qdatastream.cpp - -qiodevice.o: $(SOURCE_PATH)/src/corelib/io/qiodevice.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qiodevice.cpp - -qlibraryinfo.o: $(SOURCE_PATH)/src/corelib/global/qlibraryinfo.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qlibraryinfo.cpp - -qnumeric.o: $(SOURCE_PATH)/src/corelib/global/qnumeric.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qnumeric.cpp - -qmalloc.o: $(SOURCE_PATH)/src/corelib/global/qmalloc.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qmalloc.cpp - -qglobal.o: $(SOURCE_PATH)/src/corelib/global/qglobal.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/global/qglobal.cpp - -qhash.o: $(SOURCE_PATH)/src/corelib/tools/qhash.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qhash.cpp - -qbytearray.o: $(SOURCE_PATH)/src/corelib/tools/qbytearray.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qbytearray.cpp - -qcryptographichash.o: $(SOURCE_PATH)/src/corelib/tools/qcryptographichash.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qcryptographichash.cpp - -qvsnprintf.o: $(SOURCE_PATH)/src/corelib/tools/qvsnprintf.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qvsnprintf.cpp - -qbytearraymatcher.o: $(SOURCE_PATH)/src/corelib/tools/qbytearraymatcher.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qbytearraymatcher.cpp - -qstring.o: $(SOURCE_PATH)/src/corelib/tools/qstring.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qstring.cpp - -qlocale.o: $(SOURCE_PATH)/src/corelib/tools/qlocale.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlocale.cpp - -quuid.o: $(SOURCE_PATH)/src/corelib/plugin/quuid.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/plugin/quuid.cpp - -qbuffer.o: $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qbuffer.cpp - -qlistdata.o: $(SOURCE_PATH)/src/corelib/tools/qlistdata.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlistdata.cpp - -qlinkedlist.o: $(SOURCE_PATH)/src/corelib/tools/qlinkedlist.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qlinkedlist.cpp - -qfile.o: $(SOURCE_PATH)/src/corelib/io/qfile.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfile.cpp - -qtemporaryfile.o: $(SOURCE_PATH)/src/corelib/io/qtemporaryfile.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qtemporaryfile.cpp - -qabstractfileengine.o: $(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qabstractfileengine.cpp - -qfsfileengine_win.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp - -qfsfileengine_iterator_win.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator_win.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator_win.cpp - -qfsfileengine.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine.cpp - -qfsfileengine_iterator.o: $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfsfileengine_iterator.cpp - -qtextcodec.o: $(SOURCE_PATH)/src/codecs/qtextcodec.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/codecs/qtextcodec.cpp - -qregexp.o: $(SOURCE_PATH)/src/corelib/tools/qregexp.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qregexp.cpp - -qvector.o: $(SOURCE_PATH)/src/corelib/tools/qvector.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qvector.cpp - -qbitarray.o: $(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qbitarray.cpp - -qdir.o: $(SOURCE_PATH)/src/corelib/io/qdir.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qdir.cpp - -qdiriterator.o: $(SOURCE_PATH)/src/corelib/io/qdiriterator.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qdiriterator.cpp - -qmetatype.o: $(SOURCE_PATH)/src/corelib/kernel/qmetatype.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/kernel/qmetatype.cpp - -qfileinfo.o: $(SOURCE_PATH)/src/corelib/io/qfileinfo.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/io/qfileinfo.cpp - -qdatetime.o: $(SOURCE_PATH)/src/corelib/tools/qdatetime.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qdatetime.cpp - -qstringlist.o: $(SOURCE_PATH)/src/corelib/tools/qstringlist.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qstringlist.cpp - -qmap.o: $(SOURCE_PATH)/src/corelib/tools/qmap.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qmap.cpp - -makefile.o: $(SOURCE_PATH)/qmake/generators/makefile.cpp - $(CXX) $(CXXFLAGS) generators/makefile.cpp - -unixmake.o: $(SOURCE_PATH)/qmake/generators/unix/unixmake.cpp - $(CXX) $(CXXFLAGS) generators/unix/unixmake.cpp - -unixmake2.o: $(SOURCE_PATH)/qmake/generators/unix/unixmake2.cpp - $(CXX) $(CXXFLAGS) generators/unix/unixmake2.cpp - -winmakefile.o: $(SOURCE_PATH)/qmake/generators/win32/winmakefile.cpp - $(CXX) $(CXXFLAGS) generators/win32/winmakefile.cpp - -borland_bmake.o: $(SOURCE_PATH)/qmake/generators/win32/borland_bmake.cpp - $(CXX) $(CXXFLAGS) generators/win32/borland_bmake.cpp - -mingw_make.o: $(SOURCE_PATH)/qmake/generators/win32/mingw_make.cpp - $(CXX) $(CXXFLAGS) generators/win32/mingw_make.cpp - -msvc_nmake.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_nmake.cpp - $(CXX) $(CXXFLAGS) generators/win32/msvc_nmake.cpp - -msvc_dsp.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_dsp.cpp - $(CXX) $(CXXFLAGS) generators/win32/msvc_dsp.cpp - -msvc_vcproj.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcproj.cpp - $(CXX) $(CXXFLAGS) generators/win32/msvc_vcproj.cpp - -msvc_objectmodel.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_objectmodel.cpp - $(CXX) $(CXXFLAGS) generators/win32/msvc_objectmodel.cpp - -symmake.o: $(SOURCE_PATH)/qmake/generators/symbian/symmake.cpp - $(CXX) $(CXXFLAGS) generators/symbian/symmake.cpp - -symmake_abld.o: $(SOURCE_PATH)/qmake/generators/symbian/symmake_abld.cpp - $(CXX) $(CXXFLAGS) generators/symbian/symmake_abld.cpp - -symmake_sbsv2.o: $(SOURCE_PATH)/qmake/generators/symbian/symmake_sbsv2.cpp - $(CXX) $(CXXFLAGS) generators/symbian/symmake_sbsv2.cpp - -initprojectdeploy_symbian.o: $(SOURCE_PATH)/qmake/generators/symbian/initprojectdeploy_symbian.cpp - $(CXX) $(CXXFLAGS) generators/symbian/initprojectdeploy_symbian.cpp - -qpopen.o: $(SOURCE_PATH)/qmake/qpopen.cpp $(SOURCE_PATH)/qmake/qpopen.h - $(CXX) $(CXXFLAGS) qpopen.cpp - -project.o: $(SOURCE_PATH)/qmake/project.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h - $(CXX) $(CXXFLAGS) project.cpp - -meta.o: $(SOURCE_PATH)/qmake/meta.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h - $(CXX) $(CXXFLAGS) meta.cpp - -main.o: $(SOURCE_PATH)/qmake/main.cpp $(SOURCE_PATH)/qmake/project.h - $(CXX) $(CXXFLAGS) main.cpp - -option.o: $(SOURCE_PATH)/qmake/option.cpp $(SOURCE_PATH)/qmake/option.h - $(CXX) $(CXXFLAGS) option.cpp - -property.o: $(SOURCE_PATH)/qmake/property.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h - $(CXX) $(CXXFLAGS) property.cpp - -projectgenerator.o: $(SOURCE_PATH)/qmake/generators/projectgenerator.cpp - $(CXX) $(CXXFLAGS) generators/projectgenerator.cpp - -pbuilder_pbx.o: $(SOURCE_PATH)/qmake/generators/mac/pbuilder_pbx.cpp - $(CXX) $(CXXFLAGS) generators/mac/pbuilder_pbx.cpp - -makefiledeps.o: $(SOURCE_PATH)/qmake/generators/makefiledeps.cpp - $(CXX) $(CXXFLAGS) generators/makefiledeps.cpp - -metamakefile.o: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp - $(CXX) $(CXXFLAGS) generators/metamakefile.cpp - -xmloutput.o: $(SOURCE_PATH)/qmake/generators/xmloutput.cpp - $(CXX) $(CXXFLAGS) generators/xmloutput.cpp - -qscriptasm.o: $(SOURCE_PATH)\src\script\qscriptasm.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\script\qscriptasm.cpp - -qscriptast.o: $(SOURCE_PATH)\src\script\qscriptast.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\script\qscriptast.cpp - -qscriptastvisitor.o: $(SOURCE_PATH)\src\script\qscriptastvisitor.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\script\qscriptastvisitor.cpp - -qscriptcompiler.o: $(SOURCE_PATH)\src\script\qscriptcompiler.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\script\qscriptcompiler.cpp - -qscriptecmaarray.o: $(SOURCE_PATH)\src\script\qscriptecmaarray.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)\src\script\qscriptecmaarray.cpp - -qscriptecmaboolean.o: $(SOURCE_PATH)/src/script/qscriptecmaboolean.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptecmaboolean.cpp - -qscriptecmacore.o: $(SOURCE_PATH)/src/script/qscriptecmacore.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptecmacore.cpp - -qscriptecmadate.o: $(SOURCE_PATH)/src/script/qscriptecmadate.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptecmadate.cpp - -qscriptecmafunction.o: $(SOURCE_PATH)/src/script/qscriptecmafunction.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptecmafunction.cpp - -qscriptecmaglobal.o: $(SOURCE_PATH)/src/script/qscriptecmaglobal.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptecmaglobal.cpp - -qscriptecmamath.o: $(SOURCE_PATH)/src/script/qscriptecmamath.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptecmamath.cpp - -qscriptecmanumber.o: $(SOURCE_PATH)/src/script/qscriptecmanumber.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptecmanumber.cpp - -qscriptecmaobject.o: $(SOURCE_PATH)/src/script/qscriptecmaobject.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptecmaobject.cpp - -qscriptecmaregexp.o: $(SOURCE_PATH)/src/script/qscriptecmaregexp.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptecmaregexp.cpp - -qscriptecmastring.o: $(SOURCE_PATH)/src/script/qscriptecmastring.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptecmastring.cpp - -qscriptecmaerror.o: $(SOURCE_PATH)/src/script/qscriptecmaerror.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptecmaerror.cpp - -qscriptcontext_p.o: $(SOURCE_PATH)/src/script/qscriptcontext_p.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptcontext_p.cpp - -qscriptengine.o: $(SOURCE_PATH)/src/script/qscriptengine.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptengine.cpp - -qscriptengine_p.o: $(SOURCE_PATH)/src/script/qscriptengine_p.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptengine_p.cpp - -qscriptengineagent.o: $(SOURCE_PATH)/src/script/qscriptengineagent.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptengineagent.cpp - -qscriptextenumeration.o: $(SOURCE_PATH)/src/script/qscriptextenumeration.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptextenumeration.cpp - -qscriptextvariant.o: $(SOURCE_PATH)/src/script/qscriptextvariant.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptextvariant.cpp - -qscriptcontext.o: $(SOURCE_PATH)/src/script/qscriptcontext.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptcontext.cpp - -qscriptcontextinfo.o: $(SOURCE_PATH)/src/script/qscriptcontextinfo.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptcontextinfo.cpp - -qscriptfunction.o: $(SOURCE_PATH)/src/script/qscriptfunction.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptfunction.cpp - -qscriptgrammar.o: $(SOURCE_PATH)/src/script/qscriptgrammar.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptgrammar.cpp - -qscriptlexer.o: $(SOURCE_PATH)/src/script/qscriptlexer.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptlexer.cpp - -qscriptclassdata.o: $(SOURCE_PATH)/src/script/qscriptclassdata.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptclassdata.cpp - -qscriptparser.o: $(SOURCE_PATH)/src/script/qscriptparser.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptparser.cpp - -qscriptprettypretty.o: $(SOURCE_PATH)/src/script/qscriptprettypretty.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptprettypretty.cpp - -qscriptsyntaxchecker.o: $(SOURCE_PATH)/src/script/qscriptsyntaxchecker.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptsyntaxchecker.cpp - -qscriptclass.o: $(SOURCE_PATH)/src/script/qscriptclass.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptclass.cpp - -qscriptclasspropertyiterator.o: $(SOURCE_PATH)/src/script/qscriptclasspropertyiterator.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptclasspropertyiterator.cpp - -qscriptstring.o: $(SOURCE_PATH)/src/script/qscriptstring.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptstring.cpp - -qscriptvalue.o: $(SOURCE_PATH)/src/script/qscriptvalue.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptvalue.cpp - -qscriptvalueimpl.o: $(SOURCE_PATH)/src/script/qscriptvalueimpl.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptvalueimpl.cpp - -qscriptvalueiterator.o: $(SOURCE_PATH)/src/script/qscriptvalueiterator.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptvalueiterator.cpp - -qscriptvalueiteratorimpl.o: $(SOURCE_PATH)/src/script/qscriptvalueiteratorimpl.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/script/qscriptvalueiteratorimpl.cpp - -qxmlstream.o: $(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp - -qxmlutils.o: $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 7241678..5d9178e 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1705,9 +1705,9 @@ MakefileGenerator::writeExtraTargets(QTextStream &t) t << "\n\t" << cmd; t << endl << endl; - project->values(QLatin1String("QMAKE_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(targ); - project->values(QLatin1String("QMAKE_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(targ)) << deps.split(" ", QString::SkipEmptyParts); - project->values(QLatin1String("QMAKE_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(targ)) << cmd; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(targ); + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(targ)) << deps.split(" ", QString::SkipEmptyParts); + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(targ)) << cmd; } } @@ -1855,17 +1855,6 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, (*input), tmp_out); dep_cmd = fixEnvVariables(dep_cmd); -#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32) - QPopen procPipe; - if (procPipe.init(dep_cmd.toLatin1().constData(), "r")) { - QString indeps; - while(true) { - int read_in = procPipe.fread(buff, 255); - if(!read_in) - break; - indeps += QByteArray(buff, read_in); - } -#else if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -1875,7 +1864,6 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) indeps += QByteArray(buff, read_in); } QT_PCLOSE(proc); -#endif if(!indeps.isEmpty()) { QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' '); for(int i = 0; i < dep_cmd_deps.count(); ++i) { @@ -1926,17 +1914,17 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } t << escapeDependencyPath(tmp_out) << ":"; - project->values(QLatin1String("QMAKE_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(tmp_out); + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(tmp_out); // compiler.CONFIG+=explicit_dependencies means that ONLY compiler.depends gets to cause Makefile dependencies if(project->values((*it) + ".CONFIG").indexOf("explicit_dependencies") != -1) { t << " " << valList(escapeDependencyPaths(fileFixify(tmp_dep, Option::output_dir, Option::output_dir))); - project->values(QLatin1String("QMAKE_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(tmp_out)) << tmp_dep; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(tmp_out)) << tmp_dep; } else { t << " " << valList(escapeDependencyPaths(inputs)) << " " << valList(escapeDependencyPaths(deps)); - project->values(QLatin1String("QMAKE_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(tmp_out)) << inputs << deps; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(tmp_out)) << inputs << deps; } t << "\n\t" << cmd << endl << endl; - project->values(QLatin1String("QMAKE_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(tmp_out)) << cmd; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(tmp_out)) << cmd; continue; } for(QStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) { @@ -1965,17 +1953,6 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) char buff[256]; QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, (*input), out); dep_cmd = fixEnvVariables(dep_cmd); -#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32) - QPopen procPipe; - if (procPipe.init(dep_cmd.toLatin1().constData(), "r")) { - QString indeps; - while(true) { - int read_in = procPipe.fread(buff, 255); - if(!read_in) - break; - indeps += QByteArray(buff, read_in); - } -#else if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -1985,7 +1962,6 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) indeps += QByteArray(buff, read_in); } QT_PCLOSE(proc); -#endif if(!indeps.isEmpty()) { QStringList dep_cmd_deps = indeps.replace('\n', ' ').simplified().split(' '); for(int i = 0; i < dep_cmd_deps.count(); ++i) { @@ -2060,9 +2036,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } t << escapeDependencyPath(out) << ": " << valList(escapeDependencyPaths(deps)) << "\n\t" << cmd << endl << endl; - project->values(QLatin1String("QMAKE_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(out); - project->values(QLatin1String("QMAKE_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(out)) << deps; - project->values(QLatin1String("QMAKE_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(out)) << cmd; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(out); + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + (*it) + escapeDependencyPath(out)) << deps; + project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + (*it) + escapeDependencyPath(out)) << cmd; } } t << "compiler_clean: " << clean_targets << endl << endl; diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 1f72d3e..2f33969 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -53,12 +53,8 @@ QT_BEGIN_NAMESPACE #ifdef Q_OS_WIN32 -#if defined(Q_CC_MWERKS) -#include "qpopen.h" -#else #define QT_POPEN _popen #define QT_PCLOSE _pclose -#endif #else #define QT_POPEN popen #define QT_PCLOSE pclose @@ -88,7 +84,6 @@ class MakefileGenerator : protected QMakeSourceFileInfo QString build_args(const QString &outdir=QString()); void checkMultipleDefinition(const QString &, const QString &); -protected: //internal caches mutable QHash<QString, QMakeLocalFileName> depHeuristicsCache; mutable QHash<QString, QStringList> dependsCache; diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 94e6f2d..229035a 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -60,8 +60,8 @@ MetaMakefileGenerator::~MetaMakefileGenerator() class BuildsMetaMakefileGenerator : public MetaMakefileGenerator { - bool init_flag; private: + bool init_flag; struct Build { QString name, build; MakefileGenerator *makefile; @@ -264,7 +264,6 @@ MakefileGenerator class SubdirsMetaMakefileGenerator : public MetaMakefileGenerator { protected: - bool init_flag; struct Subdir { Subdir() : makefile(0), indent(0) { } diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index f3b90c6..bf96b73 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -291,12 +291,12 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t QStringList extraTargets; extraTargets << project->values("QMAKE_EXTRA_TARGETS") << project->values("QMAKE_EXTRA_COMPILERS"); foreach(QString item, extraTargets) { - foreach(QString targetItem, project->values(QLatin1String("QMAKE_ET_PARSED_TARGETS.") + item)) { + foreach(QString targetItem, project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + item)) { // Make sure targetpath is absolute QString absoluteTarget = fileInfo(targetItem).absoluteFilePath(); if (allPreDeps.contains(absoluteTarget)) { - QStringList deps = project->values(QLatin1String("QMAKE_ET_PARSED_DEPS.") + item + targetItem); - QString commandItem = project->values(QLatin1String("QMAKE_ET_PARSED_CMD.") + item + targetItem).join(" "); + QStringList deps = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + item + targetItem); + QString commandItem = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + item + targetItem).join(" "); // Make sure all deps paths are absolute diff --git a/qmake/generators/win32/msvc_dsp.cpp b/qmake/generators/win32/msvc_dsp.cpp index 35966b7..ebe7f81 100644 --- a/qmake/generators/win32/msvc_dsp.cpp +++ b/qmake/generators/win32/msvc_dsp.cpp @@ -1123,20 +1123,6 @@ QString DspMakefileGenerator::writeBuildstepForFileForConfig(const QString &file fileOut); dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false); if(config->canExecute(dep_cmd)) { -#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32) - QPopen procPipe; - if( procPipe.init(dep_cmd.toLatin1().constData(), "r") ) { - QString indeps; - while(true) { - int read_in = procPipe.fread(buff, 255); - if ( !read_in ) - break; - indeps += QByteArray(buff, read_in); - } - if(!indeps.isEmpty()) - step.deps += config->fileFixify(indeps.replace('\n', ' ').simplified().split(' ')); - } -#else if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -1149,7 +1135,6 @@ QString DspMakefileGenerator::writeBuildstepForFileForConfig(const QString &file if(!indeps.isEmpty()) step.deps += config->fileFixify(indeps.replace('\n', ' ').simplified().split(' ')); } -#endif } } diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 4dda30c..c192259 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -484,7 +484,7 @@ bool VCCLCompilerTool::parseOption(const char* option) QString opt(option); if (opt.contains('a') && !opt.contains('s') && !opt.contains('c')) ExceptionHandling = ehSEH; - else if (!opt.contains('a') && opt.contains("s-") && opt.contains("c-")) + else if (!opt.contains('a') && opt.contains("s-") && opt.contains("c-")) ExceptionHandling = ehNone; else if (!opt.contains('a') && opt.contains('s') && opt.contains('c')) ExceptionHandling = ehNoSEH; @@ -2215,26 +2215,6 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) Option::fixPathToLocalOS(inFile, true, false), out); if(Project->canExecute(dep_cmd)) { -#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32) - QPopen procPipe; - if( procPipe.init(dep_cmd.toLatin1().constData(), "r") ) { - QString indeps; - while(true) { - int read_in = procPipe.fread(buff, 255); - if ( !read_in ) - break; - indeps += QByteArray(buff, read_in); - } - if(!indeps.isEmpty()) { - QStringList extradeps = indeps.split(QLatin1Char('\n')); - for (int i = 0; i < extradeps.count(); ++i) { - QString dd = extradeps.at(i).simplified(); - if (!dd.isEmpty()) - deps += Project->fileFixify(dd); - } - } - } -#else if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -2253,7 +2233,6 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info) } } } -#endif } } for (int i = 0; i < deps.count(); ++i) diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 7d32dab..f2268aa 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1261,8 +1261,8 @@ void VcprojGenerator::initDeploymentTool() searchPath = info.absoluteFilePath(); } else { nameFilter = source.split('\\').last(); - if (source.contains('*')) { - source = source.split('*').first(); + if (source.contains('*')) { + source = source.split('*').first(); info = QFileInfo(source); } searchPath = info.absolutePath(); @@ -1424,20 +1424,6 @@ void VcprojGenerator::initResourceFiles() dep_cmd = Option::fixPathToLocalOS(dep_cmd, true, false); if(canExecute(dep_cmd)) { -#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32) - QPopen procPipe; - if( procPipe.init(dep_cmd.toLatin1().constData(), "r") ) { - QString indeps; - while(true) { - int read_in = procPipe.fread(buff, 255); - if ( !read_in ) - break; - indeps += QByteArray(buff, read_in); - } - if(!indeps.isEmpty()) - deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' ')); - } -#else if(FILE *proc = QT_POPEN(dep_cmd.toLatin1().constData(), "r")) { QString indeps; while(!feof(proc)) { @@ -1450,7 +1436,6 @@ void VcprojGenerator::initResourceFiles() if(!indeps.isEmpty()) deps += fileFixify(indeps.replace('\n', ' ').simplified().split(' ')); } -#endif } } vcProject.ResourceFiles.addFiles(deps); diff --git a/qmake/project.cpp b/qmake/project.cpp index 0f584f4..8455c6d 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -65,12 +65,8 @@ #include <stdlib.h> #ifdef Q_OS_WIN32 -#if defined(Q_CC_MWERKS) -#include "qpopen.h" -#else #define QT_POPEN _popen #define QT_PCLOSE _pclose -#endif #else #define QT_POPEN popen #define QT_PCLOSE pclose @@ -2250,28 +2246,6 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list, if(args.count() > 1) singleLine = (args[1].toLower() == "true"); QString output; -#if defined(Q_CC_MWERKS) && defined(Q_OS_WIN32) - QPopen procPipe; - if( !procPipe.init(args[0].toLatin1(), "r") ) { - fprintf(stderr, "%s:%d system(%s) failed.\n", - parser.file.toLatin1().constData(), - parser.line_no, - qPrintable(args[0])); - } - - while(true) { - int read_in = procPipe.fread(buff, 255); - if ( !read_in ) - break; - for(int i = 0; i < read_in; ++i) { - if((singleLine && buff[i] == '\n') || buff[i] == '\t') - buff[i] = ' '; - } - buff[read_in] = '\0'; - output += buff; - } - ret += split_value_list(output); -#else FILE *proc = QT_POPEN(args[0].toLatin1(), "r"); while(proc && !feof(proc)) { int read_in = int(fread(buff, 1, 255, proc)); @@ -2287,7 +2261,6 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list, ret += split_value_list(output); if(proc) QT_PCLOSE(proc); -#endif } break; } case E_UNIQUE: { diff --git a/qmake/qmake.pri b/qmake/qmake.pri index e982a06..fe15d71 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -19,12 +19,6 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \ generators/symbian/symmake_sbsv2.cpp \ generators/symbian/initprojectdeploy_symbian.cpp -# MWC does not provide an implementation of popen() so fake it. -win32-mwc { - SOURCES += qpopen.cpp \ -} - - HEADERS += project.h property.h generators/makefile.h \ generators/unix/unixmake.h meta.h option.h cachekeys.h \ generators/win32/winmakefile.h generators/projectgenerator.h \ @@ -132,7 +126,6 @@ bootstrap { #Qt code } else:win32 { SOURCES += qfsfileengine_win.cpp qfsfileengine_iterator_win.cpp qsettings_win.cpp win32-msvc*:LIBS += ole32.lib advapi32.lib - win32-mwc:LIBS += -lole32.lib -ladvapi32.lib } qnx { diff --git a/qmake/qpopen.cpp b/qmake/qpopen.cpp deleted file mode 100644 index f2d530d..0000000 --- a/qmake/qpopen.cpp +++ /dev/null @@ -1,140 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the qmake application of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qpopen.h" - - -QPopen::QPopen() -{ -} - -bool QPopen::init(const char *command, const char* /* mode */) -{ - SECURITY_ATTRIBUTES attributes; - - attributes.nLength = sizeof(SECURITY_ATTRIBUTES); - attributes.bInheritHandle = TRUE; - attributes.lpSecurityDescriptor = NULL; - - if (! CreatePipe(&childStdOutR, &childStdOutW, &attributes, 0)) { - return false; - } - - // Ensure that the read handle to the child process's pipe for STDOUT is not inherited. - SetHandleInformation(childStdOutR, HANDLE_FLAG_INHERIT, 0); - - // Create a pipe for the child process's STDIN. - if (! CreatePipe(&childStdInR, &childStdInW, &attributes, 0)) { - return false; - } - - // Ensure that the write handle to the child process's pipe for STDIN is not inherited. - SetHandleInformation(childStdInW, HANDLE_FLAG_INHERIT, 0); - - TCHAR *szCmdLine = new TCHAR[strlen(command)+1]; - strcpy(szCmdLine, command); - - // Set up members of the PROCESS_INFORMATION structure. - - ZeroMemory(&processInfo, sizeof(PROCESS_INFORMATION)); - - // Set up members of the STARTUPINFO structure. - - ZeroMemory(&siStartInfo, sizeof(STARTUPINFO)); - siStartInfo.cb = sizeof(STARTUPINFO); - siStartInfo.hStdError = childStdOutW; - siStartInfo.hStdOutput = childStdOutW; - siStartInfo.hStdInput = childStdInR; - siStartInfo.dwFlags |= STARTF_USESTDHANDLES; - - // Create the child process. - - bool success = CreateProcess(NULL, - szCmdLine, // command line - NULL, // process security attributes - NULL, // primary thread security attributes - TRUE, // handles are inherited - 0, // creation flags - NULL, // use parent's environment - NULL, // use parent's current directory - &siStartInfo, // STARTUPINFO pointer - &processInfo); // receives PROCESS_INFORMATION - - delete szCmdLine; - - return success; -} - -QPopen::~QPopen() -{ - CloseHandle(processInfo.hProcess); - CloseHandle(processInfo.hThread); - CloseHandle(childStdInR); - CloseHandle(childStdInW); - CloseHandle(childStdOutR); - CloseHandle(childStdOutW); -} - -int QPopen::fwrite(char* buffer, int maxBytes) -{ - DWORD bytesWritten; - - bool success = WriteFile(childStdInW, buffer, maxBytes, &bytesWritten, NULL); - if (success) { - return bytesWritten; - } - - return 0; -} - -int QPopen::fread(char* buffer, int maxBytes) -{ - DWORD bytesRead; - - if (!CloseHandle(childStdOutW)) - return 0; - - bool success = ReadFile(childStdOutR, buffer, maxBytes, &bytesRead, NULL); - if (success) - return bytesRead; - - return 0; -} diff --git a/qmake/qpopen.h b/qmake/qpopen.h deleted file mode 100644 index f979c97..0000000 --- a/qmake/qpopen.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the qmake application of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://www.qtsoftware.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QPOPEN_H -#define QPOPEN_H - -#include <windows.h> -#include <tchar.h> -#include <stdio.h> -#include <string.h> - -class QPopen -{ -public: - QPopen(); - ~QPopen(); - int fread(char* buffer, int maxBytes); - int fwrite(char* buffer, int maxBytes); - bool init(const char* command, const char* mode); - -private: - // This pair of handles represent the "Write" pipe - // ie: Parent -> Child - HANDLE childStdInR; - HANDLE childStdInW; - - // This pair of handles represent the "Read" pipe - // ie: Child -> Parent - HANDLE childStdOutR; - HANDLE childStdOutW; - PROCESS_INFORMATION processInfo; - STARTUPINFO siStartInfo; -}; - -#endif |