When passing options to the compiler you can do it in two means :
- by passing all options on the command line, see command line options
- by setting all options in a property file and passing the property file to the compiler
For example, let's say we have the following directory structure :
/home/joebarr/project : root path of your nosica project /home/joebarr/project/sources : root path of the nosica sources /home/joebarr/project/output : where you want to place the resulting executable and the intermediate files
And your main Nosica class is net.myorganisation.Main
You can either launch :
$>nosicacc -sourcepaths=/usr/local/nosica/stdlib,/home/joebarr/project/sources -code.output=/home/joebarr/project/output -error.messages=/usr/local/nosica/messages.properties net.myorganisation.Main
It works but it's long to type.
You can put all properties in a property file like in :
$>cat nosicacc.properties sourcepaths=/usr/local/nosica/stdlib,/home/joebarr/project/sources code.output=/home/joebarr/project/output error.messages=/usr/local/nosica/messages.properties
and then launch with :
$>nosicacc -p nosicacc.properties net.myorganisation.Main
Take a look to the default nosicacc.properties file shipped the distribution. It contains
- a default sourcepaths pointing to the Nosica standard library and to the current directory.
- a default code.output pointing to the current directory
- a deault error.messages pointing to the messages.properties shipped in the distribution
This file is called the system property file. By default, if the compiler is launched without any options, the values of this file are taken. It is possible to specify a different system property file with the -s switch. Properties defined in the user property file (-p) will "overwrite" the system properties.
No comments yet