Home | History | Annotate | Line # | Download | only in unit-tests
directive-include.mk revision 1.3
      1  1.3  rillig # $NetBSD: directive-include.mk,v 1.3 2020/10/31 23:01:23 rillig Exp $
      2  1.1  rillig #
      3  1.1  rillig # Tests for the .include directive, which includes another file.
      4  1.1  rillig 
      5  1.1  rillig # TODO: Implementation
      6  1.1  rillig 
      7  1.2  rillig .MAKEFLAGS: -dc
      8  1.2  rillig 
      9  1.2  rillig # All included files are recorded in the variable .MAKE.MAKEFILES.
     10  1.2  rillig # In this test, only the basenames of the files are compared since
     11  1.2  rillig # the directories can differ.
     12  1.2  rillig .include "/dev/null"
     13  1.2  rillig .if ${.MAKE.MAKEFILES:T} != "${.PARSEFILE} null"
     14  1.2  rillig .  error
     15  1.2  rillig .endif
     16  1.2  rillig 
     17  1.2  rillig # Each file is recorded only once in the variable .MAKE.MAKEFILES.
     18  1.3  rillig # Between 2015-11-26 and 2020-10-31, the very last file could be repeated,
     19  1.3  rillig # due to an off-by-one bug in ParseTrackInput.
     20  1.2  rillig .include "/dev/null"
     21  1.3  rillig .if ${.MAKE.MAKEFILES:T} != "${.PARSEFILE} null"
     22  1.2  rillig .  error
     23  1.2  rillig .endif
     24  1.2  rillig 
     25  1.1  rillig all:
     26  1.1  rillig 	@:;
     27