Lines Matching defs:target

14 #	.if !target(guard-target)
18 # variable or the guard target is defined, the file is skipped completely, as
441 # The guard can also be a target instead of a variable. Using a target as a
442 # guard has the benefit that a target cannot be undefined once it is defined.
443 # The target should be declared '.NOTMAIN'. Since the target names are
445 # target names, they don't need to be declared '.PHONY' as they don't generate
447 CASES+= target
448 LINES.target= \
449 '.if !target(__target.tmp__)' \
452 # expect: Parse_PushInput: file target.tmp, line 1
453 # expect: Skipping 'target.tmp' because '__target.tmp__' is defined
455 # When used for system files, the target name may include '<' and '>', for
458 CASES+= target-sys
459 LINES.target-sys= \
460 '.if !target(__<target-sys.tmp>__)' \
461 '__<target-sys.tmp>__: .NOTMAIN' \
463 # expect: Parse_PushInput: file target-sys.tmp, line 1
464 # expect: Skipping 'target-sys.tmp' because '__<target-sys.tmp>__' is defined
466 # The target name may include variable references. These references are
472 CASES+= target-indirect
473 LINES.target-indirect= \
474 '.if !target($${target-indirect.tmp:L})' \
475 'target-indirect.tmp: .NOTMAIN' \
477 # expect: Parse_PushInput: file target-indirect.tmp, line 1
478 # expect: Skipping 'target-indirect.tmp' because 'target-indirect.tmp' is defined
480 # A common form of guard target is __${.PARSEFILE}__. This form can only be
484 # it is not possible to define a target with whitespace, not even by cheating.
485 CASES+= target-indirect-PARSEFILE
486 LINES.target-indirect-PARSEFILE= \
487 '.if !target(__$${.PARSEFILE}__)' \
490 # expect: Parse_PushInput: file target-indirect-PARSEFILE.tmp, line 1
491 # expect: Skipping 'target-indirect-PARSEFILE.tmp' because '__target-indirect-PARSEFILE.tmp__' is defined
494 # for the target guard name, as the expressions expand to different strings.
495 CASES+= target-indirect-PARSEFILE2
496 LINES.target-indirect-PARSEFILE2= \
497 '.if !target(__$${.PARSEFILE}__)' \
500 # expect: Parse_PushInput: file target-indirect-PARSEFILE2.tmp, line 1
501 # expect: Skipping 'target-indirect-PARSEFILE2.tmp' because '__target-indirect-PARSEFILE2.tmp__' is defined
504 # guard is the same as in the test case 'target-indirect-PARSEFILE', as the
506 # without defining the guard target, the file is considered guarded.
507 CASES+= subdir/target-indirect-PARSEFILE
508 LINES.subdir/target-indirect-PARSEFILE= \
509 '.if !target(__$${.PARSEFILE}__)' \
511 # expect: Parse_PushInput: file subdir/target-indirect-PARSEFILE.tmp, line 1
512 # expect: Skipping 'subdir/target-indirect-PARSEFILE.tmp' because '__target-indirect-PARSEFILE.tmp__' is defined
514 # Another common form of guard target is __${.PARSEDIR}/${.PARSEFILE}__
516 CASES+= target-indirect-PARSEDIR-PARSEFILE
517 LINES.target-indirect-PARSEDIR-PARSEFILE= \
518 '.if !target(__$${.PARSEDIR}/$${.PARSEFILE}__)' \
521 # expect: Parse_PushInput: file target-indirect-PARSEDIR-PARSEFILE.tmp, line 1
522 # expect: Skipping 'target-indirect-PARSEDIR-PARSEFILE.tmp' because '__target-indirect-PARSEDIR-PARSEFILE.tmp__' is defined
523 # The actual target starts with '__${.OBJDIR}/', see the .rawout file, but the
527 # subdirectory gets a different guard target name than the previous one.
528 CASES+= subdir/target-indirect-PARSEDIR-PARSEFILE
529 LINES.subdir/target-indirect-PARSEDIR-PARSEFILE= \
530 '.if !target(__$${.PARSEDIR}/$${.PARSEFILE}__)' \
533 # expect: Parse_PushInput: file subdir/target-indirect-PARSEDIR-PARSEFILE.tmp, line 1
534 # expect: Skipping 'subdir/target-indirect-PARSEDIR-PARSEFILE.tmp' because '__subdir/target-indirect-PARSEDIR-PARSEFILE.tmp__' is defined
535 # The actual target starts with '__${.OBJDIR}/', see the .rawout file, but the
538 # If the guard target is not defined when including the file the next time,
540 CASES+= target-unguarded
541 LINES.target-unguarded= \
542 '.if !target(target-unguarded)' \
544 # expect: Parse_PushInput: file target-unguarded.tmp, line 1
545 # expect: Parse_PushInput: file target-unguarded.tmp, line 1
547 # The guard condition must consist of only the guard target, nothing else.
548 CASES+= target-plus
549 LINES.target-plus= \
550 '.if !target(target-plus) && 1' \
551 'target-plus: .NOTMAIN' \
553 # expect: Parse_PushInput: file target-plus.tmp, line 1
554 # expect: Parse_PushInput: file target-plus.tmp, line 1
556 # If the guard target is defined before the file is included the first time,
558 CASES+= target-already-defined
559 LINES.target-already-defined= \
560 '.if !target(target-already-defined)' \
561 'target-already-defined: .NOTMAIN' \
563 target-already-defined: .NOTMAIN
564 # expect: Parse_PushInput: file target-already-defined.tmp, line 1
565 # expect: Skipping 'target-already-defined.tmp' because 'target-already-defined' is defined
567 # A target name cannot contain the character '!'. In the condition, the '!'
570 # the beginning or in the middle of a target name. Escaping it as '${:U!}'
574 # the target name, the '\' is kept, resulting in the target name
575 # '\!target-name-exclamation' instead of '!target-name-exclamation'.
576 CASES+= target-name-exclamation
577 LINES.target-name-exclamation= \
578 '.if !target(!target-name-exclamation)' \
579 '\!target-name-exclamation: .NOTMAIN' \
581 # expect: Parse_PushInput: file target-name-exclamation.tmp, line 1
582 # expect: Parse_PushInput: file target-name-exclamation.tmp, line 1
584 # If the guard target name is enclosed in spaces, it does not have an effect,
586 CASES+= target-name-parenthesized
587 LINES.target-name-parenthesized= \
588 '.if !target( target-name-parenthesized )' \
589 'target-name-parenthesized: .NOTMAIN' \
591 # expect: Parse_PushInput: file target-name-parenthesized.tmp, line 1
592 # expect: Parse_PushInput: file target-name-parenthesized.tmp, line 1
594 # If the guard target condition is enclosed in parentheses, it does not have
596 CASES+= target-call-parenthesized
597 LINES.target-call-parenthesized= \
598 '.if (!target(target-call-parenthesized))' \
599 'target-call-parenthesized: .NOTMAIN' \
601 # expect: Parse_PushInput: file target-call-parenthesized.tmp, line 1
602 # expect: Parse_PushInput: file target-call-parenthesized.tmp, line 1