[clug] Tricky 'make' problem

Paul Matthews plm at netspace.net.au
Thu Jan 7 02:35:24 MST 2010


On 07/01/10 19:54, Hal Ashburner wrote:
> does solaris make deal with implicit rules? eg something like
>
> %.skl:  %.jcl
>         tailor  $^ -o $@
>
>   
It does appear so, but its not obvious how to use it to my advantage:

    A target entry of the form:

    tp%ts:dp%ds
         rule

    is a pattern matching rule, in which tp is a target prefix, ts is a
    target suffix, dp is a dependency prefix, and ds is a dependency
    suffix (any of which may be null). The `%' stands for a basename of
    zero or more characters that is matched in the target, and is used
    to construct the name of a dependency. When make encounters a match
    in its search for an implicit rule, it uses the rule in that target
    entry to build the target from the dependency file. Pattern-matching
    implicit rules typically make use of the $@ and $< dynamic macros as
    placeholders for the target and dependency names. Other, regular
    dependencies may occur in the dependency list; however, none of the
    regular dependencies may contain `%'. An entry of the form:

    tp%ts:[dependency ...] dp%ds[dependency ...]
         rule

    is a valid pattern matching rule.

Don't know where to go from here....

    all : skls \
          jcls

    clean:
        rm -f ${STEPSKL}
        rm -f ${STEPJCL}

    .PHONEY: skls
    skls :
        ./generate

    step%jcl: step%skl
        ./tailor $< $@

    .PHONEY: jcls
    jcls :
            # Ummm




-- 
Fools ignore complexity. Pragmatists suffer it.
Some can avoid it. Geniuses remove it.



More information about the linux mailing list