From fc1bca86081dc0698a7dd3f9c955edd194d5a798 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 16 Apr 2012 17:02:57 +0200 Subject: [PATCH] repurpose -unix/-macx/-win32 options they have been deprecated long enough, so we can mess with them now. don't make them set the target mode any more; the makespec can do that autoritatively. instead, they can be used to override the host mode for debugging purposes. Change-Id: Ife5fdcf4f1b6b926901a80896ac92b7d821278d1 Reviewed-by: Joerg Bornemann --- qmake/generators/makefile.cpp | 8 -------- qmake/option.cpp | 10 ---------- qmake/option.h | 1 - 3 files changed, 19 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index f126da3280..2a21aa9880 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2196,14 +2196,6 @@ QString MakefileGenerator::buildArgs(const QString &outdir) ret += " -spec " + fixifySpecdir(Option::mkfile::qmakespec, outdir); if (!Option::mkfile::xqmakespec_commandline.isEmpty()) ret += " -xspec " + fixifySpecdir(Option::mkfile::xqmakespec, outdir); - if (Option::target_mode_overridden) { - if (Option::target_mode == Option::TARG_MACX_MODE) - ret += " -macx"; - else if (Option::target_mode == Option::TARG_UNIX_MODE) - ret += " -unix"; - else if (Option::target_mode == Option::TARG_WIN_MODE) - ret += " -win32"; - } //arguments for(QStringList::Iterator it = Option::before_user_vars.begin(); diff --git a/qmake/option.cpp b/qmake/option.cpp index 714aebe6ef..73c2e32abc 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -94,7 +94,6 @@ QString Option::user_template_prefix; QStringList Option::shellPath; Option::HOST_MODE Option::host_mode = Option::HOST_UNKNOWN_MODE; Option::TARG_MODE Option::target_mode = Option::TARG_UNKNOWN_MODE; -bool Option::target_mode_overridden = false; //QMAKE_*_PROPERTY stuff QStringList Option::prop::properties; @@ -262,20 +261,11 @@ Option::parseCommandLine(int argc, char **argv, int skip) } else if(opt == "tp" || opt == "template_prefix") { Option::user_template_prefix = argv[++x]; } else if(opt == "macx") { - fprintf(stderr, "-macx is deprecated.\n"); Option::host_mode = HOST_MACX_MODE; - Option::target_mode = TARG_MACX_MODE; - Option::target_mode_overridden = true; } else if(opt == "unix") { - fprintf(stderr, "-unix is deprecated.\n"); Option::host_mode = HOST_UNIX_MODE; - Option::target_mode = TARG_UNIX_MODE; - Option::target_mode_overridden = true; } else if(opt == "win32") { - fprintf(stderr, "-win32 is deprecated.\n"); Option::host_mode = HOST_WIN_MODE; - Option::target_mode = TARG_WIN_MODE; - Option::target_mode_overridden = true; } else if(opt == "integrity") { Option::target_mode = TARG_INTEGRITY_MODE; } else if(opt == "d") { diff --git a/qmake/option.h b/qmake/option.h index 7b86d56e89..88ad989b82 100644 --- a/qmake/option.h +++ b/qmake/option.h @@ -177,7 +177,6 @@ struct Option enum TARG_MODE { TARG_UNKNOWN_MODE, TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_INTEGRITY_MODE }; static TARG_MODE target_mode; - static bool target_mode_overridden; static QString user_template, user_template_prefix; static QStringList shellPath;