Home | History | Annotate | Line # | Download | only in unit-tests
depsrc-usebefore.mk revision 1.5
      1  1.5  rillig # $NetBSD: depsrc-usebefore.mk,v 1.5 2020/08/22 11:53:18 rillig Exp $
      2  1.1  rillig #
      3  1.3  rillig # Tests for the special source .USEBEFORE in dependency declarations,
      4  1.3  rillig # which allows to prepend common commands to other targets.
      5  1.1  rillig 
      6  1.3  rillig all: action directly
      7  1.1  rillig 
      8  1.3  rillig first: .USEBEFORE
      9  1.5  rillig 	@echo first 1		# Using ${.TARGET} here would expand to "action"
     10  1.5  rillig 	@echo first 2		# Using ${.TARGET} here would expand to "action"
     11  1.3  rillig 
     12  1.3  rillig second: .USEBEFORE
     13  1.5  rillig 	@echo second 1
     14  1.5  rillig 	@echo second 2
     15  1.3  rillig 
     16  1.5  rillig # It is possible but uncommon to have a .USEBEFORE target with no commands.
     17  1.4  rillig # This may happen as the result of expanding a .for loop.
     18  1.3  rillig empty: .USEBEFORE
     19  1.3  rillig 
     20  1.5  rillig # It is possible but uncommon to directly make a .USEBEFORE target.
     21  1.3  rillig directly: .USEBEFORE
     22  1.3  rillig 	@echo directly
     23  1.3  rillig 
     24  1.3  rillig action: second first empty
     25