2009-02-25 09:15:00 +01:00
|
|
|
/**************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2012-01-26 18:33:46 +01:00
|
|
|
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2011-11-02 15:59:12 +01:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** This file may be used under the terms of the GNU Lesser General Public
|
|
|
|
|
** License version 2.1 as published by the Free Software Foundation and
|
|
|
|
|
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
|
|
|
** Please review the following information to ensure the GNU Lesser General
|
|
|
|
|
** Public License version 2.1 requirements will be met:
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
2011-04-13 08:42:33 +02:00
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Other Usage
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
|
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** If you have questions regarding the use of this file, please contact
|
2011-11-02 15:59:12 +01:00
|
|
|
** Nokia at qt-info@nokia.com.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
**************************************************************************/
|
2008-12-02 12:57:59 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#ifndef PROFILEEVALUATOR_H
|
|
|
|
|
#define PROFILEEVALUATOR_H
|
|
|
|
|
|
2012-05-02 15:29:11 +02:00
|
|
|
#include "qmake_global.h"
|
2012-06-11 20:56:24 +02:00
|
|
|
#include "qmakeevaluator.h"
|
2008-12-02 12:01:29 +01:00
|
|
|
#include "proitems.h"
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QHash>
|
|
|
|
|
#include <QStringList>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
|
2012-05-02 18:34:25 +02:00
|
|
|
class QMakeGlobals;
|
2012-05-02 15:39:02 +02:00
|
|
|
class QMakeParser;
|
2012-05-02 15:43:12 +02:00
|
|
|
class QMakeEvaluator;
|
2012-06-11 20:28:16 +02:00
|
|
|
class QMakeHandler;
|
2010-06-18 13:30:03 +02:00
|
|
|
|
2012-05-02 15:29:11 +02:00
|
|
|
class QMAKE_EXPORT ProFileEvaluator
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-12-07 20:32:36 +01:00
|
|
|
public:
|
2008-12-02 12:01:29 +01:00
|
|
|
enum TemplateType {
|
|
|
|
|
TT_Unknown = 0,
|
|
|
|
|
TT_Application,
|
|
|
|
|
TT_Library,
|
|
|
|
|
TT_Script,
|
2011-05-05 17:42:35 +02:00
|
|
|
TT_Aux,
|
2008-12-02 12:01:29 +01:00
|
|
|
TT_Subdirs
|
|
|
|
|
};
|
|
|
|
|
|
2010-02-08 16:47:25 +01:00
|
|
|
// Call this from a concurrency-free context
|
|
|
|
|
static void initialize();
|
|
|
|
|
|
2012-06-11 20:28:16 +02:00
|
|
|
ProFileEvaluator(QMakeGlobals *option, QMakeParser *parser, QMakeHandler *handler);
|
2010-06-18 13:30:03 +02:00
|
|
|
~ProFileEvaluator();
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-06-15 20:50:57 +02:00
|
|
|
ProFileEvaluator::TemplateType templateType() const;
|
2011-05-31 19:19:34 +02:00
|
|
|
#ifdef PROEVALUATOR_CUMULATIVE
|
2012-06-18 10:03:45 +02:00
|
|
|
void setCumulative(bool on); // Default is false
|
2011-05-31 19:19:34 +02:00
|
|
|
#endif
|
2008-12-12 16:30:31 +01:00
|
|
|
void setOutputDir(const QString &dir); // Default is empty
|
2009-07-22 16:52:44 +02:00
|
|
|
|
2012-06-11 20:56:24 +02:00
|
|
|
bool accept(ProFile *pro, QMakeEvaluator::LoadFlags flags = QMakeEvaluator::LoadAll);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-04-26 19:18:48 +02:00
|
|
|
bool contains(const QString &variableName) const;
|
2010-06-15 22:51:37 +02:00
|
|
|
QString value(const QString &variableName) const;
|
2008-12-02 12:01:29 +01:00
|
|
|
QStringList values(const QString &variableName) const;
|
|
|
|
|
QStringList values(const QString &variableName, const ProFile *pro) const;
|
2009-07-10 13:37:02 +02:00
|
|
|
QStringList absolutePathValues(const QString &variable, const QString &baseDirectory) const;
|
|
|
|
|
QStringList absoluteFileValues(
|
|
|
|
|
const QString &variable, const QString &baseDirectory, const QStringList &searchDirs,
|
|
|
|
|
const ProFile *pro) const;
|
2008-12-02 12:01:29 +01:00
|
|
|
QString propertyValue(const QString &val) const;
|
|
|
|
|
|
|
|
|
|
private:
|
2012-06-11 21:56:05 +02:00
|
|
|
QString sysrootify(const QString &path, const QString &baseDir) const;
|
|
|
|
|
|
2012-05-02 15:43:12 +02:00
|
|
|
QMakeEvaluator *d;
|
2010-02-26 12:53:30 +01:00
|
|
|
};
|
|
|
|
|
|
2010-06-22 09:03:55 +02:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#endif // PROFILEEVALUATOR_H
|