source: CMT/v1r18p20050901/source/cmt_parser.h

Last change on this file was 83, checked in by arnault, 19 years ago

Add structure_strategy - see CL#278

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