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