directive-info.mk revision 1.9 1 # $NetBSD: directive-info.mk,v 1.9 2022/01/08 20:21:34 rillig Exp $
2 #
3 # Tests for the .info directive.
4 #
5 # Until parse.c 1.502 from 2020-12-19, a missing argument to the directive
6 # produced the wrong error message "Unknown directive". Since parse.c 1.503
7 # from 2020-12-19, the correct "Missing argument" is produced.
8
9 # TODO: Implementation
10
11 .info begin .info tests
12 .inf # misspelled
13 .info # "Missing argument"
14 .info message
15 .info indented message
16 .information
17 .information message # Accepted before 2020-12-13 01:07:54.
18 .info.man: # not a message, but possibly a suffix rule
19
20 # Even if lines would have trailing whitespace, this would be trimmed by
21 # ParseGetLine.
22 .info
23 .info # comment
24
25 .info: message # This is a dependency declaration.
26 .info-message # This is an unknown directive.
27 .info no-target: no-source # This is a .info directive, not a dependency.
28 # See directive.mk for more tests of this kind.
29
30 # Since at least 2002-01-01 and before parse.c 1.639 from 2022-01-08, the line
31 # number that is used in error messages and the .info directives was the
32 # number of completely read lines. For the following multi-line directive,
33 # this meant that the reported line number was the one of the last line, not
34 # of the first line.
35 .info expect line 35 for\
36 multi$\
37 -line message
38
39 all:
40 @:;
41