Home | History | Annotate | Download | only in unit-tests

Lines Matching defs:posix

1 # $NetBSD: deptgt-posix.mk,v 1.4 2022/05/07 21:24:52 rillig Exp $
3 # Tests for the special target '.POSIX', which enables POSIX mode.
5 # As of 2022-04-18, when parsing the dependency line '.POSIX', the variable
6 # '%POSIX' is defined and <posix.mk> is included, if it exists. Other than
7 # that, POSIX support is still incomplete, the exact set of supported features
8 # needs to be cross-checked with the POSIX specification.
10 # At the point of '.POSIX:', <sys.mk> has been loaded already, unless the
11 # option '-r' was given. This means that an implementation of <posix.mk> must
15 # directory to prevent unit-tests/posix.mk from interfering with the posix.mk
24 TESTTMP= ${TMPDIR:U/tmp}/make.test.deptgt-posix
37 printf '%s\n' > ${SYSDIR}/posix.mk \
38 'CC=posix-cc'
40 check-is-posix: .USE
42 '.if $${CC} != "posix-cc"' \
45 '.if $${%POSIX} != "1003.2"' \
50 check-not-posix: .USE
55 '.if defined(%POSIX)' \
72 # strict reading of POSIX 2018 makes the makefile non-conforming.
74 after-for: .PHONY set-up-sysdir check-not-posix run
79 '.POSIX:' \
83 # a strict reading of POSIX 2018 makes the makefile non-conforming.
85 after-if: .PHONY set-up-sysdir check-not-posix run
90 '.POSIX:' \
94 # makefile tries to switch to POSIX mode, that's too late.
96 in-included-file: .PHONY set-up-sysdir check-not-posix run
98 printf '.POSIX:\n' > ${INCLUDED_MK}
100 # If the main makefile switches to POSIX mode in its very first line, before
103 in-first-line: .PHONY set-up-sysdir check-is-posix run
105 '.POSIX:'
107 # The only allowed lines before switching to POSIX mode are comment lines.
108 # POSIX defines comment lines as "blank lines, empty lines, and lines with
111 after-comment-lines: .PHONY set-up-sysdir check-is-posix run
115 '.POSIX:'
118 # In that mode, '.POSIX:' just loads <posix.mk>, which works as well.
121 no-builtins: .PHONY set-up-sysdir check-is-posix check-not-seen-sys-mk run
123 '.POSIX:'