-rw-r--r-- | qmake/generators/makefile.h | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 4fdabe8..e818089 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -1,12 +1,10 @@ /**************************************************************************** -** $Id$ +** ** -** Definition of ________ class. +** Definition of MakefileGenerator class. ** -** Created : 970521 +** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. ** -** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. -** -** This file is part of the network module of the Qt GUI Toolkit. +** This file is part of qmake. ** ** This file may be distributed under the terms of the Q Public License @@ -42,4 +40,10 @@ #include <qtextstream.h> +#ifdef Q_OS_WIN32 +#define QT_POPEN _popen +#else +#define QT_POPEN popen +#endif + class MakefileGenerator { @@ -48,5 +52,7 @@ class MakefileGenerator QStringList createObjectList(const QString &var); QString build_args(); - QMap<QString, QString> depHeuristics, depKeyMap, fileFixed; + QString dependencyKey(const QString &file) const; + QMap<QString, bool> depProcessed; + QMap<QString, QString> depHeuristics, fileFixed; QMap<QString, QString> mocablesToMOC, mocablesFromMOC; QMap<QString, QStringList> depends; @@ -82,5 +88,5 @@ protected: QString findMocSource(const QString &moc_file) const; QString findMocDestination(const QString &src_file) const; - QStringList &findDependencies(const QString &file); + virtual QStringList &findDependencies(const QString &file); void setNoIO(bool o); @@ -98,4 +104,7 @@ protected: virtual void init(); + //for cross-platform dependent directories + virtual void usePlatformDir(); + //for installs virtual QString defaultInstall(const QString &); @@ -109,6 +118,10 @@ protected: //make sure libraries are found virtual bool findLibraries(); + virtual QString findDependency(const QString &); - QString var(const QString &var); + void setProcessedDependencies(const QString &file, bool b); + bool processedDependencies(const QString &file); + + virtual QString var(const QString &var); QString varGlue(const QString &var, const QString &before, const QString &glue, const QString &after); QString varList(const QString &var); @@ -119,7 +132,7 @@ protected: QString fileFixify(const QString& file, const QString &out_dir=QString::null, - const QString &in_dir=QString::null, bool force_fix=FALSE) const; + const QString &in_dir=QString::null, bool force_fix=FALSE, bool canon=TRUE) const; QStringList fileFixify(const QStringList& files, const QString &out_dir=QString::null, - const QString &in_dir=QString::null, bool force_fix=FALSE) const; + const QString &in_dir=QString::null, bool force_fix=FALSE, bool canon=TRUE) const; public: MakefileGenerator(QMakeProject *p); @@ -127,5 +140,5 @@ public: static MakefileGenerator *create(QMakeProject *); - bool write(); + virtual bool write(); virtual bool openOutput(QFile &) const; }; @@ -167,7 +180,11 @@ inline bool MakefileGenerator::findLibraries() { return TRUE; } +inline QString MakefileGenerator::findDependency(const QString &) +{ return QString(""); } + inline MakefileGenerator::~MakefileGenerator() { } +QString mkdir_p_asstring(const QString &dir); #endif /* __MAKEFILE_H__ */ |