1 1.7 rillig # $NetBSD: directive-sinclude.mk,v 1.7 2025/06/28 22:39:28 rillig Exp $ 2 1.1 rillig # 3 1.1 rillig # Tests for the .sinclude directive, which includes another file, 4 1.1 rillig # silently skipping it if it cannot be opened. 5 1.2 rillig # 6 1.2 rillig # The 'silently skipping' only applies to the case where the file cannot be 7 1.2 rillig # opened. Parse errors and other errors are handled the same way as in the 8 1.2 rillig # other .include directives. 9 1.1 rillig 10 1.3 rillig # No complaint that there is no such file. 11 1.3 rillig .sinclude "${.CURDIR}/directive-include-nonexistent.inc" 12 1.3 rillig 13 1.3 rillig # No complaint either, even though the operating system error is ENOTDIR, not 14 1.3 rillig # ENOENT. 15 1.3 rillig .sinclude "${MAKEFILE}/subdir" 16 1.3 rillig 17 1.3 rillig # Errors that are not related to opening the file are still reported. 18 1.7 rillig # expect: make: directive-include-error.inc:1: Invalid line "syntax error" 19 1.3 rillig _!= echo 'syntax error' > directive-include-error.inc 20 1.3 rillig .sinclude "${.CURDIR}/directive-include-error.inc" 21 1.3 rillig _!= rm directive-include-error.inc 22 1.1 rillig 23 1.4 rillig all: .PHONY 24