get rid of Option::user_configs
merge them into before_user_vars. they are evaluated right after another anyway. Change-Id: I11859284b363fee01233f6e20989444fef711d0d Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
This commit is contained in:
parent
a30074bab8
commit
c679b2f0a6
@ -2235,10 +2235,6 @@ QString MakefileGenerator::buildArgs(const QString &outdir)
|
||||
ret += " -win32";
|
||||
}
|
||||
|
||||
//configs
|
||||
for(QStringList::Iterator it = Option::user_configs.begin();
|
||||
it != Option::user_configs.end(); ++it)
|
||||
ret += " -config " + (*it);
|
||||
//arguments
|
||||
for(QStringList::Iterator it = Option::before_user_vars.begin();
|
||||
it != Option::before_user_vars.end(); ++it) {
|
||||
|
@ -344,8 +344,6 @@ ProjectGenerator::writeMakefile(QTextStream &t)
|
||||
t << "######################################################################" << endl;
|
||||
t << "# Automatically generated by qmake (" << qmake_version() << ") " << QDateTime::currentDateTime().toString() << endl;
|
||||
t << "######################################################################" << endl << endl;
|
||||
if(!Option::user_configs.isEmpty())
|
||||
t << "CONFIG += " << Option::user_configs.join(" ") << endl;
|
||||
int i;
|
||||
for(i = 0; i < Option::before_user_vars.size(); ++i)
|
||||
t << Option::before_user_vars[i] << endl;
|
||||
|
@ -91,7 +91,6 @@ QString Option::output_dir;
|
||||
Option::QMAKE_RECURSIVE Option::recursive = Option::QMAKE_RECURSIVE_DEFAULT;
|
||||
QStringList Option::before_user_vars;
|
||||
QStringList Option::after_user_vars;
|
||||
QStringList Option::user_configs;
|
||||
QString Option::user_template;
|
||||
QString Option::user_template_prefix;
|
||||
QStringList Option::shellPath;
|
||||
@ -219,6 +218,8 @@ bool usage(const char *a0)
|
||||
int
|
||||
Option::parseCommandLine(int argc, char **argv, int skip)
|
||||
{
|
||||
QStringList user_configs;
|
||||
|
||||
bool before = true;
|
||||
for(int x = skip; x < argc; x++) {
|
||||
if(*argv[x] == '-' && strlen(argv[x]) > 1) { /* options */
|
||||
@ -303,7 +304,7 @@ Option::parseCommandLine(int argc, char **argv, int skip)
|
||||
} else if(opt == "nr" || opt == "norecursive") {
|
||||
Option::recursive = Option::QMAKE_RECURSIVE_NO;
|
||||
} else if(opt == "config") {
|
||||
Option::user_configs += argv[++x];
|
||||
user_configs += argv[++x];
|
||||
} else {
|
||||
if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
|
||||
Option::qmake_mode == Option::QMAKE_GENERATE_PRL) {
|
||||
@ -376,6 +377,9 @@ Option::parseCommandLine(int argc, char **argv, int skip)
|
||||
}
|
||||
}
|
||||
|
||||
if (!user_configs.isEmpty())
|
||||
Option::before_user_vars += "CONFIG += " + user_configs.join(" ");
|
||||
|
||||
return Option::QMAKE_CMDLINE_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,7 @@ struct Option
|
||||
static int warn_level;
|
||||
enum QMAKE_RECURSIVE { QMAKE_RECURSIVE_DEFAULT, QMAKE_RECURSIVE_YES, QMAKE_RECURSIVE_NO };
|
||||
static QMAKE_RECURSIVE recursive;
|
||||
static QStringList before_user_vars, after_user_vars, user_configs;
|
||||
static QStringList before_user_vars, after_user_vars;
|
||||
enum HOST_MODE { HOST_UNKNOWN_MODE, HOST_UNIX_MODE, HOST_WIN_MODE, HOST_MACX_MODE };
|
||||
static HOST_MODE host_mode;
|
||||
enum TARG_MODE { TARG_UNKNOWN_MODE, TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE,
|
||||
|
@ -1321,14 +1321,6 @@ QMakeProject::read(uchar cmd)
|
||||
}
|
||||
}
|
||||
|
||||
//commandline configs
|
||||
if ((cmd & ReadSetup) && !Option::user_configs.isEmpty()) {
|
||||
parser.file = "(configs)";
|
||||
parser.from_file = false;
|
||||
parser.line_no = 1; //really arg count now.. duh
|
||||
parse("CONFIG += " + Option::user_configs.join(" "), vars);
|
||||
}
|
||||
|
||||
// After user configs, to override them
|
||||
if (!extra_configs.isEmpty()) {
|
||||
parser.file = "(extra configs)";
|
||||
|
Loading…
Reference in New Issue
Block a user