From 114a878c64ce6f8223cfd22d76a20eb16d177e5e Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- buildtools/autotools/makefilehandler.h | 76 ++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 buildtools/autotools/makefilehandler.h (limited to 'buildtools/autotools/makefilehandler.h') diff --git a/buildtools/autotools/makefilehandler.h b/buildtools/autotools/makefilehandler.h new file mode 100644 index 00000000..77045fe9 --- /dev/null +++ b/buildtools/autotools/makefilehandler.h @@ -0,0 +1,76 @@ +/* + KDevelop Autotools Support + Copyright (c) 2005 by Matt Rogers + +*************************************************************************** +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +*************************************************************************** +*/ +#ifndef MAKEFILEHANDLER_H +#define MAKEFILEHANDLER_H + +/** + * This class is responsible for taking the data from the Makefile.am parser + * and providing various data list view items can use in the automake manager + * widget + * @author Matt Rogers + */ +namespace AutoTools { +class ProjectAST; +} + +class MakefileHandler +{ +public: + MakefileHandler(); + ~MakefileHandler(); + + /** + * Parse a folder that has supported makefiles in it. The following files + * will be looked for in the following order: + * \li Makefile.am.in + * \li Makefile.am + * \li Makefile.in + * + * \param folder, the folder to parse + * \param recursive if true, subfolders will be parsed - defaults to true + */ + void parse( const QString& folder, bool recursive = true ); + + /** + * Get the AST for a certain path + * \param folderPath the path of the folder to get an AST for + * \return the AST that represents a particular folder + */ + AutoTools::ProjectAST* astForFolder( const QString& folderPath ); + + /** + * Check if a string is an automake variable + * \return true if it is an automake variable, false otherwise + */ + bool isVariable( const QString& item ) const; + + /** + * Find the value for the variable specified by \p variable + * \param variable The name of the variable to look for + * \param ast the AST to use to look for the variable in + * \return the value to substitute for the variable + */ + QString resolveVariable( const QString& variable, + AutoTools::ProjectAST* ast ); + + +private: + class Private; + Private* d; +}; + +#endif + +//kate: space-indent on; indent-width 4; + -- cgit v1.2.1