[Omake] "#!" processing.

Aleksey Nogin nogin at metaprl.org
Fri Apr 27 15:44:28 PDT 2007


Jason,

I have some doubts whether processing the "#!" lines is necessarily a 
good idea. The primary reason is the third bullet in my commit message 
below - the processing of "#!" lines has to tolerate failures 
(silently), which means that this processing introduces a high degree of 
unpredictability, where some changes to the "#!" may have very 
unexpected results...

Note that the original intent from your commit message:

    Another point is that the options are processed at parse time,
    so options like -warn-error are handled correctly.

does not seem to be implemented (yet?), so is there any reason to 
process "#!", where the usual OMakeFlags will work the same, but be more 
predictable?

Aleksey

On 27.04.2007 15:38, Aleksey Nogin wrote:

> A follow-up to Rev. 10487 ("#! lines):
>  - Only react to "#!" lines in the beginning of a file (for compatibility with
>    standard shell processing), consider them comments when they happen in the
>    middle
> 
>  - Fixed a bug with "#!osh" complaining "unknown option: osh" (the "#!"
>    processing failed to skip the first element of the argv)
> 
>  - Ignore any unknown options or other argv parsing errors in the "#!" lines.
>    This is needed because the internal "#!" processing currently only has
>    access to a subset of the options that are available on the command line
>    (for example, the debugging flags are only available on the command line).
>    Unfortunately, the only way to do this within the current Lm_arg setup is
>    to ignore _all_ options when there is an unknown one...
> 
> ----
> Changes:
>     +6 -0	omake-branches/0.9.8.2/doc/html/changelog.html
>     +12 -10	omake-branches/0.9.8.2/src/builtin/omake_builtin_rule.ml
>     +12 -11	omake-branches/0.9.8.2/src/env/omake_ast_lex.mll
>     +9 -6	omake-branches/0.9.8.2/src/env/omake_env.ml
>     +6 -8	omake-branches/0.9.8.2/src/env/omake_ir_ast.ml
>     +7 -9	omake-branches/0.9.8.2/src/ir/omake_symbol.ml
>  
> A hyperlinked version of this commit is available at
> http://svn.metaprl.org/commitlogs/omake/2007-04.html#07/04/27.15:38:04
> 


More information about the OMake-Devel mailing list