makefile thoughts

Aristotle Pagaltzis pagaltzis at gmx.de
Mon Jan 4 22:52:52 UTC 2010


* Nicholas Clark <nick at ccl4.org> [2010-01-04 17:05]:
> I had assumed that a rule of the form
>
> target1 target2: ...
> 	action with parameters
>
> meant that targets 1 and 2 were built together by 1 invocation
> of action, not that action was capable of building either, and
> hence had to be run twice.

Actually, writing targets and dependencies on a single line is
pure syntactic sugar in make. The following rule:

    target1 target2: dep1 dep2 dep3
        something

is completely equivalent to the following:

    target1: dep1
    target1: dep2
    target1: dep3
    target2: dep1
    target2: dep2
    target2: dep3
    target1:
        something
    target2:
        something

This is not pseudocode. You can actually write it this way.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>


More information about the parrot-dev mailing list