1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4; coding: utf-8 -*- */ 2 /* mk-project-private.h 3 * 4 * Copyright (C) 2009 Sébastien Granjoux 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 of the 9 * License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public 17 * License along with this program; if not, write to the 18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef _MK_PROJECT_PRIVATE_H_ 23 #define _MK_PROJECT_PRIVATE_H_ 24 25 #include "mk-project.h" 26 27 G_BEGIN_DECLS 28 29 struct _MkpProperty { 30 AnjutaToken *ac_init; /* AC_INIT macro */ 31 gchar *name; 32 gchar *version; 33 gchar *bug_report; 34 gchar *tarname; 35 gchar *url; 36 }; 37 38 struct _MkpProject { 39 AnjutaProjectNode parent; 40 41 /* uri of the project; this can be a full uri, even though we 42 * can only work with native local files */ 43 GFile *root_file; 44 45 /* shortcut hash tables, mapping id -> GNode from the tree above */ 46 GHashTable *groups; 47 GHashTable *files; 48 GHashTable *variables; 49 50 GHashTable *rules; 51 GHashTable *suffix; 52 53 /* project files monitors */ 54 GHashTable *monitors; 55 56 /* Number of not loaded node */ 57 gint loading; 58 59 /* Keep list style */ 60 AnjutaTokenStyle *space_list; 61 AnjutaTokenStyle *arg_list; 62 }; 63 64 struct _MkpRule { 65 gchar *name; 66 const gchar *part; 67 gboolean phony; 68 gboolean pattern; 69 GList *prerequisite; 70 AnjutaToken *rule; 71 }; 72 73 gchar *mkp_project_token_evaluate (MkpProject *project, AnjutaToken *token); 74 75 AnjutaProjectNode* mkp_target_new (const gchar *name, AnjutaProjectNodeType type); 76 void mkp_target_free (MkpTarget *node); 77 void mkp_target_add_token (MkpTarget *node, AnjutaToken *token); 78 AnjutaProjectNode* mkp_object_new (const gchar *name); 79 AnjutaProjectNode* mkp_source_new (GFile *file); 80 81 G_END_DECLS 82 83 #endif /* _MK_PROJECT_PRIVATE_H_ */ 84