Changeset 1738
- Timestamp:
- 11/07/08 15:39:03 (2 months ago)
- Location:
- cobra/trunk
- Files:
-
- 2 added
- 3 modified
-
Developer/IntermediateReleaseNotes.text (modified) (1 diff)
-
Source/CommandLine.cobra (modified) (2 diffs)
-
Source/SharpGenerator.cobra (modified) (1 diff)
-
Tests/700-command-line/650-out-option.cobra (added)
-
Tests/700-command-line/652-out-option-verify.cobra (added)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Developer/IntermediateReleaseNotes.text
r1733 r1738 22 22 # the fully general form is: 23 23 (get|pro|set) <name> from (var|<varName>) as <type> 24 25 * Added -out: command line option. 24 26 25 27 * Modified commandline options so -r becomes synonym for -run rather -
cobra/trunk/Source/CommandLine.cobra
r1723 r1738 282 282 'type': 'bool', 283 283 'description': 'Enable optimizations.', 284 }, 285 { 286 'name': 'out', 287 'type': 'string', 288 'description': 'Specify output file name (default: base name of first file). -test overrides this with a temporary program that runs only the unit tests and is then removed afterwards.', 289 'args': 'FILENAME', 284 290 }, 285 291 { … … 1254 1260 return false 1255 1261 1262 def get(key as String) as dynamic? 1263 return this[key] 1264 1256 1265 def getDefault(key as String, default as dynamic?) as dynamic? 1257 1266 if .containsKey(key) -
cobra/trunk/Source/SharpGenerator.cobra
r1733 r1738 133 133 134 134 # exe names 135 outName = if(options.boolValue('test'), _modules[_modules.count-1].sharpFileName, _firstFileName to !) 135 if options.boolValue('test') 136 outName = _modules[_modules.count-1].sharpFileName 137 else if options.containsKey('out') 138 outName = options.get('out') 139 else 140 outName = _firstFileName to ! 136 141 if outName.endsWith('.cs') or outName.endsWith('.CS'), outName = outName[:-3] 137 142 if outName.endsWith('.cobra') or outName.endsWith('.COBRA'), outName = outName[:-6] 143 target = options.getDefault('target', 'exe') 144 if target in ['exe', 'winexe'] and (outName.endsWith('.exe') or outName.endsWith('.EXE')) 145 outName = outName[:-4] # csc always adds the extension itself 146 else if target == 'lib' and (outName.endsWith('.dll') or outName.endsWith('.DLL')) 147 outName = outName[:-4] 138 148 _baseExeFileName = outName 139 149
