Wiki

Changes between Version 7 and Version 8 of CommandLine

Show
Ignore:
Timestamp:
10/14/12 21:43:25 (5 years ago)
Author:
hopscc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CommandLine

    v7 v8  
    1 == Command Line == 
     1== Cobra Compiler Command Line == 
    22 
    33Quick examples: 
     
    5959   options form : -[option or synonym]:value 
    6060 
    61 === -Reference/-Ref === 
     61=== '''-reference/-ref''' === 
    6262  * Specifies a file (in .Net an assembly file) that can resolve 'using namespace' references. 
    6363 
     
    9393 
    9494 
    95 TODO Sections 
    96     * Files:file 
    97     * Controlling type of executable built -target/-t 
    98     * Providing references and library search path -reference/-ref -library-directory/-lib -embed-run-time/-ert 
     95=== '''-files:filename''' === 
     96Specify a filename containing a list of files to compile. 
     97 
     98Files are specified one sourcefile name per line and lines may be space separated. 
     99Lines containing a leading '#' are ignored as comment or documentary information 
     100 
     101Source filenames should be given as specified on the command line ( filenames,partial or absolute pathnames with or without an explicit '.cobra' suffix'). 
     102 
     103This option is an accumulator so multiple occurrences will specify multiple files whoose contents will aggregate together. 
     104 
     105e.g. 
     106Given a file named srcFiles containing 
     107{{{ 
     108#srcFiles: cobra source files for ... 
     109 
     110main.cobra 
     111input 
     112 
     113#Useful utilities local to this project 
     114utils.cobra 
     115}}} 
     116 
     117the following compilation line 
     118{{{ 
     119cobra -c -files:srcFiles 
     120}}} 
     121is exactly the same as  
     122{{{ 
     123cobra -c main.cobra input utils.cobra 
     124# which is the same as  
     125#cobra -c main.cobra input.cobra utils.cobra 
     126}}} 
     127 
     128This is useful compiling an executable with a large number of or non trivial hierarchy of source files. 
     129 
     130 
     131 
     132=== '''-target/-t''' === 
     133Specifies the types of executable built where such needs specifying explicitly (.Net). 
     134 
     135Current examples include: executable, GUI executable, Library. 
     136 
     137Defaults to 'normal' executable 
     138 
     139Values of this option can be a choice of one of : 
     140  * exe - build a normal executable 
     141  * winexe - build a windows executable ( .Net)  
     142     * Program is assumed to be a GUI program providing its own windows.   
     143     * Suppresses creation of a console window if not run from a console. 
     144  * lib - build a Library file (a .dll on .Net) 
     145  * module - build a module 
     146 
     147{{{ 
     148e.g. 
     149cobra -c codeFile.cobra 
     150# build/compile a standard executable from cobra source in codeFile.cobra 
     151 
     152cobra -c -t:exe codeFile.cobra 
     153# same as above  
     154 
     155cobra -c -t:winexe  codeFile.cobra 
     156# compile a windows(GUI) executable from cobra source in codeFile.cobra 
     157 
     158cobra -c -t:lib codeFile.cobra 
     159# build/compile a library file (dll) from cobra source in codeFile.cobra 
     160# this is intended to be used as the target of a -ref option 
     161}}} 
     162 
     163 
     164 
     165=== TODO Sections === 
     166    * Providing references and library search path -library-directory/-lib -embed-run-time/-ert 
    99167    * Controlling compilation -include-{asserts, nil-checks, tests}   
    100168       * -optimize/-o -debug/-d -turbo/-t