Home | History | Annotate | Line # | Download | only in unit-tests
suff.mk revision 1.3.4.2
      1  1.3.4.2  perseant # $NetBSD: suff.mk,v 1.3.4.2 2025/08/02 05:58:37 perseant Exp $
      2  1.3.4.2  perseant #
      3  1.3.4.2  perseant # Demonstrate suffix rules and dependency resolution.
      4  1.3.4.2  perseant 
      5  1.3.4.2  perseant 
      6  1.3.4.2  perseant # Circumvent the file system cache.
      7  1.3.4.2  perseant .if !make(init) && !make(step*)
      8  1.3.4.2  perseant all:
      9  1.3.4.2  perseant 	@${MAKE} -f ${MAKEFILE} init
     10  1.3.4.2  perseant 	@${MAKE} -f ${MAKEFILE} step1
     11  1.3.4.2  perseant .endif
     12  1.3.4.2  perseant 
     13  1.3.4.2  perseant 
     14  1.3.4.2  perseant .if make(init)
     15  1.3.4.2  perseant init:
     16  1.3.4.2  perseant .  if ${.PARSEDIR:tA} != ${.CURDIR:tA}
     17  1.3.4.2  perseant ${:U}!=		cd ${MAKEFILE:H} && cp a*.mk ${.CURDIR}
     18  1.3.4.2  perseant .  endif
     19  1.3.4.2  perseant .endif
     20  1.3.4.2  perseant 
     21  1.3.4.2  perseant 
     22  1.3.4.2  perseant .if make(step1)
     23  1.3.4.2  perseant step1: .PHONY edge-case.to everything
     24  1.3.4.2  perseant 
     25  1.3.4.2  perseant .MAKEFLAGS: -dsv
     26  1.3.4.2  perseant 
     27  1.3.4.2  perseant .SUFFIXES: .from .to
     28  1.3.4.2  perseant 
     29  1.3.4.2  perseant .from.to:
     30  1.3.4.2  perseant 	: Making ${.TARGET} from ${.ALLSRC}.
     31  1.3.4.2  perseant 
     32  1.3.4.2  perseant # When making this target, ${.ARCHIVE} is undefined, but there's no warning.
     33  1.3.4.2  perseant # expect: Var_Parse: ${.ARCHIVE}.additional (eval)
     34  1.3.4.2  perseant edge-case.to: ${.PREFIX}${.ARCHIVE}.additional
     35  1.3.4.2  perseant 
     36  1.3.4.2  perseant edge-case.from edge-case.additional:
     37  1.3.4.2  perseant 	: Making ${.TARGET} out of nothing.
     38  1.3.4.2  perseant 
     39  1.3.4.2  perseant everything: .PHONY a*.mk
     40  1.3.4.2  perseant 	: Making ${.TARGET} from ${.ALLSRC}.
     41  1.3.4.2  perseant .endif
     42