make lupdate a host tool
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>
Fri, 8 Mar 2013 17:46:29 +0000 (18:46 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 19 Mar 2013 07:39:38 +0000 (08:39 +0100)
lupdate makes no sense on x-built targets at all.
though one may also argue whether it makes sense to actually bootstrap
it - while its use may be supported by the build system, it's typically
not part of regular builds, but rather used shortly before running
linguist - for which a host build of qt is necessary anyway.
one argument for bootstrapping is that it uses the qmldevtools library,
which logically should be bootstrapped (the only other current user is
qmlmin, which definitely *is* used in regular builds and thus needs
bootstrapping).

Change-Id: Ia3ddd901fe2b0c2b7b77af7f1ebc66d757fc7783
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
src/linguist/lupdate/lupdate.pro
src/linguist/lupdate/main.cpp

index ee42568..da38078 100644 (file)
@@ -1,3 +1,4 @@
+option(host_build)
 QT = core-private
 
 qtHaveModule(qmldevtools) {
index 2d15901..cc0d42a 100644 (file)
@@ -499,6 +499,7 @@ static void processProjects(bool topLevel, bool nestComplain, const QStringList
 int main(int argc, char **argv)
 {
     QCoreApplication app(argc, argv);
+#ifndef QT_BOOTSTRAPPED
 #ifndef Q_OS_WIN32
     QTranslator translator;
     QTranslator qtTranslator;
@@ -510,6 +511,7 @@ int main(int argc, char **argv)
         app.installTranslator(&qtTranslator);
     }
 #endif // Q_OS_WIN32
+#endif
 
     m_defaultExtensions = QLatin1String("java,jui,ui,c,c++,cc,cpp,cxx,ch,h,h++,hh,hpp,hxx,js,qs,qml");