Home | History | Annotate | Line # | Download | only in unit-tests
      1  1.3  rillig # $NetBSD: opt-touch-jobs.mk,v 1.3 2025/05/18 06:24:27 rillig Exp $
      2  1.1  rillig #
      3  1.1  rillig # Tests for the -t command line option in jobs mode.
      4  1.1  rillig 
      5  1.1  rillig .MAKEFLAGS: -j1
      6  1.1  rillig .MAKEFLAGS: -t
      7  1.1  rillig .MAKEFLAGS: opt-touch-phony
      8  1.1  rillig .MAKEFLAGS: opt-touch-join
      9  1.1  rillig .MAKEFLAGS: opt-touch-use
     10  1.1  rillig .MAKEFLAGS: opt-touch-make
     11  1.1  rillig 
     12  1.2  rillig # .PHONY targets are not touched since they do not represent actual files.
     13  1.2  rillig # See Job_Touch.
     14  1.1  rillig opt-touch-phony: .PHONY
     15  1.1  rillig 	: Making $@.
     16  1.1  rillig 
     17  1.2  rillig # .JOIN targets are not touched since they do not represent actual files.
     18  1.2  rillig # See Job_Touch.
     19  1.1  rillig opt-touch-join: .JOIN
     20  1.1  rillig 	: Making $@.
     21  1.1  rillig 
     22  1.2  rillig # .USE targets are not touched since they do not represent actual files.
     23  1.2  rillig # See Job_Touch.
     24  1.1  rillig opt-touch-use: .USE
     25  1.1  rillig 	: Making use of $@.
     26  1.1  rillig 
     27  1.1  rillig # Even though it is listed last, in the output it appears first.
     28  1.1  rillig # This is because it is the only node that actually needs to be run.
     29  1.1  rillig # The "is up to date" of the other nodes happens after all jobs have
     30  1.3  rillig # finished, by Make_MakeParallel > MakePrintStatusList > MakePrintStatus.
     31  1.1  rillig opt-touch-make: .MAKE
     32  1.1  rillig 	: Making $@.
     33  1.1  rillig 
     34  1.1  rillig .END:
     35  1.1  rillig 	@files=$$(ls opt-touch-* 2>/dev/null | grep -v -e '\.' -e '\*'); \
     36  1.1  rillig 	[ -z "$$files" ] || { echo "created files: $$files" 1>&2; exit 1; }
     37