~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to buildtools/autotools/makefilehandler.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
  KDevelop Autotools Support
3
 
  Copyright (c) 2005 by Matt Rogers <mattr@kde.org>
4
 
 
5
 
***************************************************************************
6
 
*                                                                         *
7
 
*   This program is free software; you can redistribute it and/or modify  *
8
 
*   it under the terms of the GNU General Public License as published by  *
9
 
*   the Free Software Foundation; either version 2 of the License, or     *
10
 
*   (at your option) any later version.                                   *
11
 
*                                                                         *
12
 
***************************************************************************
13
 
*/
14
 
#ifndef MAKEFILEHANDLER_H
15
 
#define MAKEFILEHANDLER_H
16
 
 
17
 
/**
18
 
 * This class is responsible for taking the data from the Makefile.am parser
19
 
 * and providing various data list view items can use in the automake manager
20
 
 * widget
21
 
 * @author Matt Rogers
22
 
 */
23
 
namespace AutoTools {
24
 
class ProjectAST;
25
 
}
26
 
 
27
 
class MakefileHandler
28
 
{
29
 
public:
30
 
    MakefileHandler();
31
 
    ~MakefileHandler();
32
 
 
33
 
    /**
34
 
     * Parse a folder that has supported makefiles in it. The following files
35
 
     * will be looked for in the following order:
36
 
     * \li Makefile.am.in
37
 
     * \li Makefile.am
38
 
     * \li Makefile.in
39
 
     *
40
 
     * \param folder, the folder to parse
41
 
     * \param recursive if true, subfolders will be parsed - defaults to true
42
 
     */
43
 
    void parse( const QString& folder, bool recursive = true );
44
 
 
45
 
    /**
46
 
     * Get the AST for a certain path
47
 
     * \param folderPath the path of the folder to get an AST for
48
 
     * \return the AST that represents a particular folder
49
 
     */
50
 
    AutoTools::ProjectAST* astForFolder( const QString& folderPath );
51
 
 
52
 
    /**
53
 
     * Check if a string is an automake variable
54
 
     * \return true if it is an automake variable, false otherwise
55
 
     */
56
 
    bool isVariable( const QString& item ) const;
57
 
 
58
 
    /**
59
 
     * Find the value for the variable specified by \p variable
60
 
     * \param variable The name of the variable to look for
61
 
     * \param ast the AST to use to look for the variable in
62
 
     * \return the value to substitute for the variable
63
 
     */
64
 
    QString resolveVariable( const QString& variable,
65
 
                             AutoTools::ProjectAST* ast );
66
 
 
67
 
 
68
 
private:
69
 
    class Private;
70
 
    Private* d;
71
 
};
72
 
 
73
 
#endif
74
 
 
75
 
//kate: space-indent on; indent-width 4;
76