directive-include-fatal.mk revision 1.1
11.1Srillig# $NetBSD: directive-include-fatal.mk,v 1.1 2020/09/13 09:20:23 rillig Exp $ 21.1Srillig# 31.1Srillig# Test for the .include directive combined with fatal errors. 41.1Srillig# 51.1Srillig# At 2020-09-13, the code in Parse_File that sets "fatals = 0" looked 61.1Srillig# suspicious, as if it were possible to suppress fatal errors by including 71.1Srillig# another file. It was a false alarm though, since Parse_File only handles 81.1Srillig# the top-level makefiles from the command line. Any included files are 91.1Srillig# handled by Parse_include_file instead, and that function does not reset 101.1Srillig# the "fatals" counter. 111.1Srillig 121.1Srillig# Using an undefined variable in a condition generates a fatal error. 131.1Srillig.if ${UNDEF} 141.1Srillig.endif 151.1Srillig 161.1Srillig# Including another file does not reset the global variable "fatals". 171.1Srillig# The exit status will be 1. 181.1Srillig.include "/dev/null" 191.1Srillig 201.1Srilligall: 211.1Srillig @:; 22