2015-03-04 17:14:28 +01:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2015-03-04 17:14:28 +01:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2015-03-04 17:14:28 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2015-03-04 17:14:28 +01:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2015-03-04 17:14:28 +01:00
|
|
|
|
|
|
|
|
#include <utils/fileutils.h>
|
|
|
|
|
#include <qtsupport/baseqtversion.h>
|
|
|
|
|
#include <qmakeprojectmanager/qmakestep.h>
|
|
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QLogggingCategory;
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
namespace QmakeProjectManager {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
struct QMakeAssignment
|
|
|
|
|
{
|
|
|
|
|
QString variable;
|
|
|
|
|
QString op;
|
|
|
|
|
QString value;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class MakeFileParse
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
MakeFileParse(const QString &makefile);
|
|
|
|
|
|
|
|
|
|
enum MakefileState { MakefileMissing, CouldNotParse, Okay };
|
|
|
|
|
|
|
|
|
|
MakefileState makeFileState() const;
|
|
|
|
|
Utils::FileName qmakePath() const;
|
|
|
|
|
QString srcProFile() const;
|
|
|
|
|
QMakeStepConfig config() const;
|
|
|
|
|
|
|
|
|
|
QString unparsedArguments() const;
|
|
|
|
|
|
|
|
|
|
QtSupport::BaseQtVersion::QmakeBuildConfigs
|
|
|
|
|
effectiveBuildConfig(QtSupport::BaseQtVersion::QmakeBuildConfigs defaultBuildConfig) const;
|
|
|
|
|
|
|
|
|
|
static const QLoggingCategory &logging();
|
|
|
|
|
|
2016-10-07 13:03:00 +02:00
|
|
|
void parseCommandLine(const QString &command);
|
|
|
|
|
|
2015-03-04 17:14:28 +01:00
|
|
|
private:
|
|
|
|
|
void parseArgs(const QString &args, QList<QMakeAssignment> *assignments, QList<QMakeAssignment> *afterAssignments);
|
|
|
|
|
void parseAssignments(QList<QMakeAssignment> *assignments);
|
|
|
|
|
|
|
|
|
|
class QmakeBuildConfig
|
|
|
|
|
{
|
|
|
|
|
public:
|
2015-06-18 15:14:06 +02:00
|
|
|
bool explicitDebug = false;
|
|
|
|
|
bool explicitRelease = false;
|
|
|
|
|
bool explicitBuildAll = false;
|
|
|
|
|
bool explicitNoBuildAll = false;
|
2015-03-04 17:14:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
MakefileState m_state;
|
|
|
|
|
Utils::FileName m_qmakePath;
|
|
|
|
|
QString m_srcProFile;
|
|
|
|
|
|
|
|
|
|
QmakeBuildConfig m_qmakeBuildConfig;
|
|
|
|
|
QMakeStepConfig m_config;
|
|
|
|
|
QString m_unparsedArguments;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace QmakeProjectManager
|