source: CMT/HEAD/source/cmt_parser.h @ 549

Last change on this file since 549 was 549, checked in by rybkin, 14 years ago

See C.L. 434

  • Property svn:eol-style set to native
File size: 6.9 KB
Line 
1//-----------------------------------------------------------
2// Copyright Christian Arnault LAL-Orsay CNRS
3// arnault@lal.in2p3.fr
4// Modified by garonne@lal.in2p3.fr
5// See the complete license in cmt_license.txt "http://www.cecill.info".
6//-----------------------------------------------------------
7
8#ifndef __cmt_parser_h__
9#define __cmt_parser_h__
10
11/*
12  Generation of shell scripts :
13  We consider for the moment only csh and sh
14  */
15typedef enum
16{
17  Csh,
18  Sh,
19  Bat,
20  Make,
21  Requirements
22} PrintMode;
23
24typedef enum
25{
26  mgr_style,
27  cmt_style,
28  //  no_version_style,
29  none_style
30} CmtDirStyle;
31
32typedef enum
33{
34  default_structuring_style,
35  with_version_directory,
36  without_version_directory
37} CmtStructuringStyle;
38
39typedef enum
40{
41  default_filtering_mode,
42  block_private_uses,
43  reach_private_uses
44} CmtScopeFilteringMode;
45
46/*
47  Commands correspond to keywords in the requirements file.
48  */
49typedef enum
50{
51  CommandNone,
52  CommandAction,
53  CommandAlias,
54  CommandApplication,
55  CommandApplyPattern,
56  CommandApplyTag,
57  CommandAuthor,
58  CommandBranches,
59  CommandBuildStrategy,
60  CommandCleanupScript,
61  CommandCmtPathPattern,
62  CommandDocument,
63  CommandEndPrivate,
64  CommandEndPublic,
65  CommandIgnorePattern,
66  CommandIncludeDirs,
67  CommandIncludePath,
68  CommandLanguage,
69  CommandLibrary,
70  CommandMacro,
71  CommandMacroPrepend,
72  CommandMacroAppend,
73  CommandMacroRemove,
74  CommandMacroRemoveRegexp,
75  CommandMacroRemoveAll,
76  CommandMacroRemoveAllRegexp,
77  CommandMakeFragment,
78  CommandManager,
79  CommandPackage,
80  CommandPath,
81  CommandPathAppend,
82  CommandPathPrepend,
83  CommandPathRemove,
84  CommandPathRemoveRegexp,
85  CommandPattern,
86  CommandPrivate,
87  CommandProject,
88  CommandProjectAuthor,
89  CommandPublic,
90  CommandSet,
91  CommandSetAppend,
92  CommandSetPrepend,
93  CommandSetRemove,
94  CommandSetRemoveRegexp,
95  CommandSetupScript,
96  CommandSetupStrategy,
97  CommandStructureStrategy,
98  CommandTag,
99  CommandTagExclude,
100  CommandUse,
101  CommandVersion,
102  CommandVersionStrategy,
103  Commands
104} CommandType;
105
106/*
107  The scope is modified while the requirements file is read
108  when the keywords public or private are met.
109  It is also set to public when a used requirements file is read.
110  */
111
112typedef enum
113{
114  DeveloperMode,
115  UserMode
116} AccessMode;
117
118typedef enum
119{
120  ScopeUnspecified,
121  ScopePublic,
122  ScopePrivate
123} ScopeType;
124
125typedef enum
126{
127  Unspecified = -1,
128  Off = 0,
129  On = 1
130} State;
131
132typedef enum
133{
134  PriorityLowest   = 0,
135  PriorityDefault  = 1,
136  PriorityVersion  = 2,
137  PriorityUname    = 3,
138  PrioritySite     = 4,
139  PriorityUserTag  = 5,
140  PriorityTag      = 6,
141  PriorityConfig   = 7,
142  PriorityArgument = 8
143} Priority;
144
145typedef enum
146{
147  SetupScript,
148  CleanupScript
149} ScriptType;
150
151//
152// Build strategy is a mix of various options
153//  + predefined values should be multiples of 2^n
154//  + effective value is an OR of these options
155//  + all options should be specified inthis enum as pairs
156//    of <option> - no<option>. One of them being preset to zero
157//    (which represents the default) the other being set to a unique 2^n value.
158//
159typedef enum
160{
161  Prototypes     = 0x1,
162  NoPrototypes   = Prototypes << 1,
163  DefaultPrototypesStrategy = Prototypes, 
164  PrototypesMask = Prototypes | NoPrototypes,
165
166  WithInstallArea    = NoPrototypes << 1,
167  WithoutInstallArea = WithInstallArea << 1,
168  DefaultInstallAreaStrategy = WithoutInstallArea, 
169  InstallAreaMask    = WithInstallArea | WithoutInstallArea,
170
171  BuildStrategyMask  = PrototypesMask | InstallAreaMask,
172
173  DefaultBuildStrategy = DefaultPrototypesStrategy | DefaultInstallAreaStrategy
174} BuildStrategy;
175
176typedef enum
177{
178  SetupConfig = 0x1,
179  SetupNoConfig = SetupConfig << 1,
180  SetupConfigMask = SetupConfig | SetupNoConfig,
181
182  SetupRoot = SetupNoConfig << 1,
183  SetupNoRoot = SetupRoot << 1,
184  SetupRootMask = SetupRoot | SetupNoRoot,
185
186  SetupCleanup = SetupNoRoot << 1,
187  SetupNoCleanup = SetupCleanup << 1,
188  SetupCleanupMask = SetupCleanup | SetupNoCleanup,
189
190  SetupStrategyMask = SetupConfigMask | SetupRootMask | SetupCleanupMask,
191
192  DefaultSetupStrategy = SetupConfig | SetupRoot | SetupCleanup
193} SetupStrategy;
194
195typedef enum
196{
197  WithVersionDirectory = 0x1,
198  WithoutVersionDirectory   = WithVersionDirectory << 1,
199  DefaultVersionDirectoryStrategy = WithVersionDirectory, 
200  VersionDirectoryMask = WithVersionDirectory | WithoutVersionDirectory,
201
202  StructureStrategyMask  = VersionDirectoryMask,
203
204  DefaultStructureStrategy = DefaultVersionDirectoryStrategy
205} StructureStrategy;
206
207typedef enum
208{
209  Application,
210  Library,
211  Document
212} ConstituentType;
213
214/*
215  Command line action
216  */
217typedef enum
218{
219  action_none,
220  action_awk,
221  action_broadcast,
222
223  action_build,
224
225  action_build_constituent_makefile,
226  action_build_constituent_config,
227  action_build_constituents_makefile,
228  action_build_constituents_config,
229  action_build_dependencies,
230  action_build_library_links,
231  action_build_make_setup,
232  action_build_msdev,
233  action_build_CMT_pacman,
234  // Visual Studio.net Support                 
235  action_build_vsnet,                           
236  action_build_os9_makefile,
237  action_build_prototype,
238  action_build_readme,
239  action_build_tag_makefile,
240  action_build_temporary_name,
241  action_build_triggers,
242  action_build_windefs,
243
244  action_check,
245
246  action_check_configuration,
247  action_check_files,
248  action_check_version,
249  action_checkout,
250  action_cleanup,
251  action_config,
252  action_create,
253  action_create_project,
254  action_cvsbranches,
255  action_cvssubpackages,
256  action_cvssubprojects,
257  action_cvstags,
258  action_do,
259  action_expand_model,
260  action_filter,
261  action_help,
262  action_load,
263  action_lock,
264  action_relocate,
265  action_remove,
266  action_remove_library_links,
267  action_run,
268  action_run_sequence,
269
270  action_set_version,
271  action_set_versions,
272
273  action_setup,
274
275  action_show,
276
277  action_show_action,
278  action_show_action_value,
279  action_show_action_names,
280  action_show_actions,
281  action_show_all_tags,
282  action_show_applied_patterns,
283  action_show_author,
284  action_show_branches,
285  action_show_clients,
286  action_show_cmtpath_patterns,
287  action_show_constituent,
288  action_show_constituent_names,
289  action_show_constituents,
290  action_show_container,
291  action_show_cycles,
292  action_show_fragment,
293  action_show_fragments,
294  action_show_groups,
295  action_show_include_dirs,
296  action_show_language,
297  action_show_languages,
298  action_show_macro,
299  action_show_macro_value,
300  action_show_macro_names,
301  action_show_macros,
302  action_show_manager,
303  action_show_packages,
304  action_show_path,
305  action_show_pattern,
306  action_show_pattern_names,
307  action_show_patterns,
308  action_show_projects,
309  action_show_project_author,
310  action_show_setup,
311  action_show_pwd,
312  action_show_set,
313  action_show_set_names,
314  action_show_set_value,
315  action_show_sets,
316  action_show_strategies,
317  action_show_tags,
318  action_show_use_paths,
319  action_show_uses,
320  action_show_version,
321  action_show_versions,
322
323  action_system,
324  action_unlock,
325  action_version
326} ActionType;
327
328#define SLASH '/'
329
330class Use;
331typedef Use* UseRef;
332
333#include "cmt_std.h"
334#include "cmt_string.h"
335#include "cmt_vector.h"
336#include "cmt.h"
337
338#endif
Note: See TracBrowser for help on using the repository browser.