~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to AspectC++/ACConfig.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#include "Naming.h"
37
37
 
38
38
static OptsParser::Option options[] = {
39
 
  { ACConfig::ACOPT_VERSION, 'V', "version",
 
39
  { ACConfig::ACOPT_VERSION, "V", "version",
40
40
    "\t" "Version information", OptsParser::AT_NONE },
41
 
  { ACConfig::ACOPT_VERBOSE, 'v', "verbose",
 
41
  { ACConfig::ACOPT_VERBOSE, "v", "verbose",
42
42
    "Level of verbosity (0-9)", OptsParser::AT_MANDATORY },
43
 
  { ACConfig::ACOPT_COMPILE, 'c', "compile",
 
43
  { ACConfig::ACOPT_COMPILE, "c", "compile",
44
44
    "Name of the input file", OptsParser::AT_MANDATORY },
45
 
  { ACConfig::ACOPT_OUTPUT, 'o', "output",
 
45
  { ACConfig::ACOPT_OUTPUT, "o", "output",
46
46
    "\t" "Name of the output file", OptsParser::AT_MANDATORY },
47
 
  { ACConfig::ACOPT_INCLUDE_FILES, 'i', "include_files",
 
47
  { ACConfig::ACOPT_INCLUDE_FILES, "i", "include_files",
48
48
    "Generate manipulated header files", OptsParser::AT_NONE },
49
 
  { ACConfig::ACOPT_ASPECT_HEADER, 'a', "aspect_header",
 
49
  { ACConfig::ACOPT_ASPECT_HEADER, "a", "aspect_header",
50
50
    "Name of aspect header file or '0'", OptsParser::AT_MANDATORY }, 
51
 
  { ACConfig::ACOPT_REPOSITORY, 'r', "repository",
 
51
  { ACConfig::ACOPT_REPOSITORY, "r", "repository",
52
52
    "Name of the project repository", OptsParser::AT_MANDATORY }, 
53
 
  { ACConfig::ACOPT_PROBLEM_LOCAL_CLASS, 0, "problem_local_class",
 
53
  { ACConfig::ACOPT_PROBLEM_LOCAL_CLASS, NULL, "problem_local_class",
54
54
    "Back-end does not support local classes correctly", OptsParser::AT_NONE }, 
55
 
  { ACConfig::ACOPT_NO_PROBLEM_LOCAL_CLASS, 0, "no_problem_local_class",
 
55
  { ACConfig::ACOPT_NO_PROBLEM_LOCAL_CLASS, NULL, "no_problem_local_class",
56
56
    "Back-end supports local classes correctly", OptsParser::AT_NONE }, 
57
 
  { ACConfig::ACOPT_PROBLEM_SPEC_SCOPE, 0,
 
57
  { ACConfig::ACOPT_PROBLEM_SPEC_SCOPE, NULL,
58
58
    "problem_spec_scope",
59
59
    "Back-end does not support template specialization in non-namespace",
60
60
    OptsParser::AT_NONE }, 
61
 
  { ACConfig::ACOPT_NO_PROBLEM_SPEC_SCOPE, 0,
 
61
  { ACConfig::ACOPT_NO_PROBLEM_SPEC_SCOPE, NULL,
62
62
    "no_problem_spec_scope",
63
63
    "Back-end supports template specialization in non-namespace scope",
64
64
    OptsParser::AT_NONE },
65
 
  { ACConfig::ACOPT_NOLINE, 0,
 
65
  { ACConfig::ACOPT_PROBLEM_FORCE_INLINE, NULL, "problem_force_inline",
 
66
    "Back-end does not support forced inlining correctly", OptsParser::AT_NONE }, 
 
67
  { ACConfig::ACOPT_NO_PROBLEM_FORCE_INLINE, NULL, "no_problem_force_inline",
 
68
    "Back-end supports forced inlining correctly", OptsParser::AT_NONE }, 
 
69
  { ACConfig::ACOPT_NOLINE, NULL,
66
70
    "no_line",
67
71
    "\t" "\t" "Don't generate #line directives",
68
72
    OptsParser::AT_NONE },
69
 
  { ACConfig::ACOPT_GEN_SIZE_TYPE, 0, "gen_size_type",
70
 
    "argument type for generated new operator", OptsParser::AT_MANDATORY }, 
71
 
  { ACConfig::ACOPT_PROJ_FILE, 0, "proj_file",
 
73
  { ACConfig::ACOPT_GEN_SIZE_TYPE, NULL, "gen_size_type",
 
74
    "Argument type for generated new operator", OptsParser::AT_MANDATORY }, 
 
75
  { ACConfig::ACOPT_PROJ_FILE, NULL, "proj_file",
72
76
    "\t" "Path to the project file", OptsParser::AT_MANDATORY},
73
 
  { ACConfig::ACOPT_WARN_DEPRECATED, 0, "warn_deprecated",
 
77
  { ACConfig::ACOPT_WARN_DEPRECATED, NULL, "warn_deprecated",
74
78
    "\t" "Warn if deprecated syntax is used", OptsParser::AT_NONE },
75
 
  { ACConfig::ACOPT_NO_WARN_DEPRECATED, 0, "no_warn_deprecated",
 
79
  { ACConfig::ACOPT_NO_WARN_DEPRECATED, NULL, "no_warn_deprecated",
76
80
    "Don't warn if deprecated syntax is used", OptsParser::AT_NONE },
77
 
  { ACConfig::ACOPT_WARN_MACRO, 0, "warn_macro",
 
81
  { ACConfig::ACOPT_WARN_MACRO, NULL, "warn_macro",
78
82
    "\t" "Warn if a macro transformation had to be ignored",
79
83
    OptsParser::AT_NONE },
80
 
  { ACConfig::ACOPT_NO_WARN_MACRO, 0, "no_warn_macro",
 
84
  { ACConfig::ACOPT_NO_WARN_MACRO, NULL, "no_warn_macro",
81
85
    "\t" "Don't warn if a macro transformation had to be ignored",
82
86
    OptsParser::AT_NONE },
83
 
  { ACConfig::ACOPT_KEYWORDS, 'k', "keywords",
 
87
  { ACConfig::ACOPT_KEYWORDS, "k", "keywords",
84
88
    "\t" "Allow AspectC++ keywords in normal project files",
85
89
    OptsParser::AT_NONE },
86
 
  { 0, 0, 0, 0, OptsParser::AT_NONE }
 
90
  { ACConfig::ACOPT_DYNAMIC, 0, "dynamic",
 
91
    "\t\t" "Prepare generated code for dynamic weaving",
 
92
    OptsParser::AT_NONE },
 
93
  { 0, NULL, 0, 0, OptsParser::AT_NONE }
87
94
};
88
95
 
89
96
 
109
116
  _nosave              = false;
110
117
  _noline              = false;
111
118
  _iterate_aspects     = true;
 
119
 
 
120
  // default setting: unknown compilers have a problem with everything
 
121
  _problem_local_class         = true;
 
122
  _problem_spec_scope          = true;
 
123
  _problem_force_inline        = true;
112
124
  if (_project.config ().Option ("--gnu") ||
113
125
      _project.config ().Option ("--gnu-2.95")) {
114
 
    _problem_local_class = false;
115
 
    _problem_spec_scope  = true;
 
126
    _problem_local_class         = false;
 
127
    _problem_force_inline        = false;
116
128
  } else if (_project.config ().Option ("--vc")) {
117
 
    _problem_local_class = true;
118
 
    _problem_spec_scope  = false;
119
 
  } else {
120
 
    _problem_local_class = true;
121
 
    _problem_spec_scope  = true;
 
129
    _problem_spec_scope          = false;
122
130
  }
123
131
  _warn_deprecated = true;
124
 
  _warn_macro = true;
125
 
  bool keywords = false;
 
132
  _warn_macro      = true;
 
133
  _dynamic         = false;
 
134
  bool keywords    = false;
126
135
  
127
136
  char* tmp;
128
137
 
194
203
    case ACOPT_NO_PROBLEM_SPEC_SCOPE:
195
204
      _problem_spec_scope = false;
196
205
      break;
 
206
    case ACOPT_PROBLEM_FORCE_INLINE:
 
207
      _problem_force_inline = true;
 
208
      break;
 
209
    case ACOPT_NO_PROBLEM_FORCE_INLINE:
 
210
      _problem_force_inline = false;
 
211
      break;
197
212
    case ACOPT_GEN_SIZE_TYPE:
198
213
      _size_type = op.getArgument ().c_str ();
199
214
      break;
216
231
    case ACOPT_KEYWORDS:
217
232
      keywords = true;
218
233
      break;
 
234
    case ACOPT_DYNAMIC:
 
235
      _dynamic = true;
 
236
      break;
219
237
    default:
220
238
      usage (_argv[0]);
221
239
      return false;
250
268
      stringstream genfile;
251
269
      if (_project.src (0L))
252
270
        genfile << _project.src (0L);
253
 
      genfile << "ac_gen." << extension () << ends;
 
271
      genfile << "ac_gen." << extension ();
254
272
           _file_in = StrCol::dup (genfile.str ().data ());
255
273
    }
256
274
  }
263
281
      SysCall::canonical (_project.src(i), canon);
264
282
      ostringstream name;
265
283
      Naming::mangle_file (name, canon.name ());
266
 
      name << ends;
267
284
      paths.insert (name.str ());
268
285
    }
269
286
    _project_id = *paths.begin ();
280
297
    SysCall::canonical (_proj_file.c_str (), canon);
281
298
    ostringstream name;
282
299
    Naming::mangle_file (name, canon.name ());
283
 
    name << ends;
284
300
    _project_id = name.str ();
285
301
  }
286
302
  
305
321
        << endl;
306
322
   for (int o = 0; options[o].number > 0; o++) {
307
323
     cerr << "     ";
308
 
     if (options[o].key)  cerr << "-" << options[o].key;
309
 
     if (options[o].key && options[o].name) cerr << "|";
310
 
     if (options[o].name) cerr << "--" << options[o].name;
311
 
     if (options[o].args) cerr << " <arg>";
 
324
     if (options[o].shortName)  cerr << "-" << options[o].shortName;
 
325
     if (options[o].shortName && options[o].longName) cerr << "|";
 
326
     if (options[o].longName) cerr << "--" << options[o].longName;
 
327
     if (options[o].argType != OptsParser::AT_NONE) cerr << " <arg>";
312
328
     if (options[o].desc) cerr << " \t" << options[o].desc;
313
329
     cerr << endl;
314
330
   }