1*98875883SSimon J. Gerraty# $NetBSD: directive-hyphen-include.mk,v 1.3 2023/08/19 10:52:13 rillig Exp $ 2956e45f6SSimon J. Gerraty# 3956e45f6SSimon J. Gerraty# Tests for the .-include directive, which includes another file, 4956e45f6SSimon J. Gerraty# silently skipping it if it cannot be opened. 59f45a3c8SSimon J. Gerraty# 69f45a3c8SSimon J. Gerraty# The 'silently skipping' only applies to the case where the file cannot be 79f45a3c8SSimon J. Gerraty# opened. Parse errors and other errors are handled the same way as in the 89f45a3c8SSimon J. Gerraty# other .include directives. 9956e45f6SSimon J. Gerraty 109f45a3c8SSimon J. Gerraty# No complaint that there is no such file. 119f45a3c8SSimon J. Gerraty.-include "${.CURDIR}/directive-hyphen-include-nonexistent.inc" 12956e45f6SSimon J. Gerraty 139f45a3c8SSimon J. Gerraty# No complaint either, even though the operating system error is ENOTDIR, not 149f45a3c8SSimon J. Gerraty# ENOENT. 159f45a3c8SSimon J. Gerraty.-include "${MAKEFILE}/subdir" 169f45a3c8SSimon J. Gerraty 179f45a3c8SSimon J. Gerraty# Errors that are not related to opening the file are still reported. 18*98875883SSimon J. Gerraty# expect: make: "directive-hyphen-include-error.inc" line 1: Invalid line 'syntax error' 199f45a3c8SSimon J. Gerraty_!= echo 'syntax error' > directive-hyphen-include-error.inc 209f45a3c8SSimon J. Gerraty.-include "${.CURDIR}/directive-hyphen-include-error.inc" 219f45a3c8SSimon J. Gerraty_!= rm directive-hyphen-include-error.inc 229f45a3c8SSimon J. Gerraty 239f45a3c8SSimon J. Gerratyall: .PHONY 24