Roland Ver. 4.5 Technical Information Seite 44

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 212
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 43
34 GNU make
.EXPORT_ALL_VARIABLES
Simply by being mentioned as a target, this tells make to export all variables
to child processes by default. See Section 5.7.2 [Communicating Variables to a
Sub-make], page 52.
.NOTPARALLEL
If .NOTPARALLEL is mentioned as a target, then this invocation of make will
be run serially, even if the -j option is given. Any recursively invoked make
command will still run recipes in parallel (unless its makefile also contains this
target). Any prerequisites on this target are ignored.
.ONESHELL
If .ONESHELL is mentioned as a target, then when a target is built all lines of
the recipe will be given to a single invocation of the shell rather than each line
being invoked separately (see Section 5.3 [Recipe Execution], page 44).
.POSIX
If .POSIX is mentioned as a target, then the makefile will be parsed and run
in POSIX-conforming mode. This does not mean that only POSIX-conforming
makefiles will be accepted: all advanced GNU make features are still available.
Rather, this target causes make to behave as required by POSIX in those areas
where make’s default behavior differs.
In particular, if this target is mentioned then recipes will be invoked as if the
shell had been passed the -e flag: the first failing command in a recipe will
cause the recipe to fail immediately.
Any defined implicit rule suffix also counts as a special target if it appears as a target,
and so does the concatenation of two suffixes, such as .c.o’. These targets are suffix rules,
an obsolete way of defining implicit rules (but a way still widely used). In principle, any
target name could be special in this way if you break it in two and add both pieces to the
suffix list. In practice, suffixes normally begin with .’, so these special target names also
begin with .’. See Section 10.7 [Old-Fashioned Suffix Rules], page 125.
4.9 Multiple Targets in a Rule
A rule with multiple targets is equivalent to writing many rules, each with one target, and
all identical aside from that. The same recipe applies to all the targets, but its effect may
vary because you can substitute the actual target name into the recipe using $@’. The rule
contributes the same prerequisites to all the targets also.
This is useful in two cases.
You want just prerequisites, no recipe. For example:
kbd.o command.o files.o: command.h
gives an additional prerequisite to each of the three object files mentioned.
Similar recipes work for all the targets. The recipes do not need to be absolutely
identical, since the automatic variable $@ can be used to substitute the particular
target to be remade into the commands (see Section 10.5.3 [Automatic Variables],
page 120). For example:
Seitenansicht 43
1 2 ... 39 40 41 42 43 44 45 46 47 48 49 ... 211 212

Kommentare zu diesen Handbüchern

Keine Kommentare