D.3 Opus Make v5.2x Compatibility and Emulation

omake is not entirely backward compatible with Opus Make 5.2x.

The -E2 command-line flag makes omake emulate Opus Make 5.2x.

omake has the following compatibility and emulation features:

comment

v5.2x treated line continuation before comment detection, so a comment character (#) in a continued line causes the rest of the continued line to be ignored. omake treats # as a comment only until the end of the current physical line.

do

In v5.2x, macro definitions on the %do line were separated by a comma (,). In omake, they are separated by white space and must be enclosed in double quotes if they contain white space.

infer

v5.2x searched for the inferred source unless explicitly told not to with the .NOINFER attribute. omake searches for the inferred source only for targets without build scripts but the .INFER attribute can force it to search.

noiterate

The shell-line prefix ! means iterate this build script. Note that ! can also indicate a directive; the rule is that it indicates a directive if it can; otherwise, it is a prefix.

! echo $(.SOURCES)

Does not iterate: !echo is a directive

!| echo $(.SOURCES)

Iterates: | indicates the end of prefixes

! add $? to $@

Iterates: !add isn't a directive

@! echo $(.SOURCES)

Does not iterate: !echo is a directive

!@ echo $(.SOURCES)

Iterates: !@ is not a directive

The noiterate feature turns off any interpretation of ! as a shell-line prefix.

twopass

Opus Make v5.2x used two passes to macro expand build scripts. The first pass expanded all macros. The second pass tokenized the line and replaced any found targets with the pathname to the target. omake does not do the second pass unless you choose this feature. omake has a macro modifier, X, that allows selective expansion of names into pathnames.