summaryrefslogtreecommitdiffstats
path: root/buildtools/autotools/makefilehandler.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /buildtools/autotools/makefilehandler.h
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
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
Diffstat (limited to 'buildtools/autotools/makefilehandler.h')
-rw-r--r--buildtools/autotools/makefilehandler.h76
1 files changed, 76 insertions, 0 deletions
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 <mattr@kde.org>
+
+***************************************************************************
+* *
+* 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;
+