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";
|
ret += " -win32";
|
||||||
}
|
}
|
||||||
|
|
||||||
//configs
|
|
||||||
for(QStringList::Iterator it = Option::user_configs.begin();
|
|
||||||
it != Option::user_configs.end(); ++it)
|
|
||||||
ret += " -config " + (*it);
|
|
||||||
//arguments
|
//arguments
|
||||||
for(QStringList::Iterator it = Option::before_user_vars.begin();
|
for(QStringList::Iterator it = Option::before_user_vars.begin();
|
||||||
it != Option::before_user_vars.end(); ++it) {
|
it != Option::before_user_vars.end(); ++it) {
|
||||||
|
@ -344,8 +344,6 @@ ProjectGenerator::writeMakefile(QTextStream &t)
|
|||||||
t << "######################################################################" << endl;
|
t << "######################################################################" << endl;
|
||||||
t << "# Automatically generated by qmake (" << qmake_version() << ") " << QDateTime::currentDateTime().toString() << endl;
|
t << "# Automatically generated by qmake (" << qmake_version() << ") " << QDateTime::currentDateTime().toString() << endl;
|
||||||
t << "######################################################################" << endl << endl;
|
t << "######################################################################" << endl << endl;
|
||||||
if(!Option::user_configs.isEmpty())
|
|
||||||
t << "CONFIG += " << Option::user_configs.join(" ") << endl;
|
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < Option::before_user_vars.size(); ++i)
|
for(i = 0; i < Option::before_user_vars.size(); ++i)
|
||||||
t << Option::before_user_vars[i] << endl;
|
t << Option::before_user_vars[i] << endl;
|
||||||
|
@ -91,7 +91,6 @@ QString Option::output_dir;
|
|||||||
Option::QMAKE_RECURSIVE Option::recursive = Option::QMAKE_RECURSIVE_DEFAULT;
|
Option::QMAKE_RECURSIVE Option::recursive = Option::QMAKE_RECURSIVE_DEFAULT;
|
||||||
QStringList Option::before_user_vars;
|
QStringList Option::before_user_vars;
|
||||||
QStringList Option::after_user_vars;
|
QStringList Option::after_user_vars;
|
||||||
QStringList Option::user_configs;
|
|
||||||
QString Option::user_template;
|
QString Option::user_template;
|
||||||
QString Option::user_template_prefix;
|
QString Option::user_template_prefix;
|
||||||
QStringList Option::shellPath;
|
QStringList Option::shellPath;
|
||||||
@ -219,6 +218,8 @@ bool usage(const char *a0)
|
|||||||
int
|
int
|
||||||
Option::parseCommandLine(int argc, char **argv, int skip)
|
Option::parseCommandLine(int argc, char **argv, int skip)
|
||||||
{
|
{
|
||||||
|
QStringList user_configs;
|
||||||
|
|
||||||
bool before = true;
|
bool before = true;
|
||||||
for(int x = skip; x < argc; x++) {
|
for(int x = skip; x < argc; x++) {
|
||||||
if(*argv[x] == '-' && strlen(argv[x]) > 1) { /* options */
|
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") {
|
} else if(opt == "nr" || opt == "norecursive") {
|
||||||
Option::recursive = Option::QMAKE_RECURSIVE_NO;
|
Option::recursive = Option::QMAKE_RECURSIVE_NO;
|
||||||
} else if(opt == "config") {
|
} else if(opt == "config") {
|
||||||
Option::user_configs += argv[++x];
|
user_configs += argv[++x];
|
||||||
} else {
|
} else {
|
||||||
if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
|
if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
|
||||||
Option::qmake_mode == Option::QMAKE_GENERATE_PRL) {
|
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;
|
return Option::QMAKE_CMDLINE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ struct Option
|
|||||||
static int warn_level;
|
static int warn_level;
|
||||||
enum QMAKE_RECURSIVE { QMAKE_RECURSIVE_DEFAULT, QMAKE_RECURSIVE_YES, QMAKE_RECURSIVE_NO };
|
enum QMAKE_RECURSIVE { QMAKE_RECURSIVE_DEFAULT, QMAKE_RECURSIVE_YES, QMAKE_RECURSIVE_NO };
|
||||||
static QMAKE_RECURSIVE recursive;
|
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 };
|
enum HOST_MODE { HOST_UNKNOWN_MODE, HOST_UNIX_MODE, HOST_WIN_MODE, HOST_MACX_MODE };
|
||||||
static HOST_MODE host_mode;
|
static HOST_MODE host_mode;
|
||||||
enum TARG_MODE { TARG_UNKNOWN_MODE, TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_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
|
// After user configs, to override them
|
||||||
if (!extra_configs.isEmpty()) {
|
if (!extra_configs.isEmpty()) {
|
||||||
parser.file = "(extra configs)";
|
parser.file = "(extra configs)";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user