Home | History | Annotate | Line # | Download | only in unit-tests
deptgt.mk revision 1.4
      1 # $NetBSD: deptgt.mk,v 1.4 2020/09/14 18:21:26 rillig Exp $
      2 #
      3 # Tests for special targets like .BEGIN or .SUFFIXES in dependency
      4 # declarations.
      5 
      6 # TODO: Implementation
      7 
      8 # Just in case anyone tries to compile several special targets in a single
      9 # dependency line: That doesn't work, and make immediately rejects it.
     10 .SUFFIXES .PHONY: .c.o
     11 
     12 # Keyword "parse.c:targets"
     13 #
     14 # The following lines demonstrate how 'target' is set and reset during
     15 # parsing of dependencies.  To see it in action, set breakpoints in:
     16 #
     17 #	ParseDoDependency	at the beginning
     18 #	ParseFinishLine		at "targets = NULL"
     19 #	Parse_File		at "Lst_Free(targets)"
     20 #	Parse_File		at "targets = Lst_Init()"
     21 #	Parse_File		at "!inLine"
     22 #
     23 target1 target2: sources
     24 	: command1
     25 	: command2
     26 VAR=value
     27 	: command3
     28 
     29 all:
     30 	@:;
     31