Home | History | Annotate | Line # | Download | only in unit-tests
      1 # $NetBSD: dep-double-colon-indep.mk,v 1.1 2020/10/23 19:11:30 rillig Exp $
      2 #
      3 # Tests for the :: operator in dependency declarations, which allows multiple
      4 # dependency groups with the same target.  Each group is evaluated on its own,
      5 # independent of the other groups.
      6 #
      7 # This is useful for targets that are updatable, such as a database or a log
      8 # file.  Be careful with parallel mode though, to avoid lost updates and
      9 # other inconsistencies.
     10 #
     11 # The target 1300 depends on 1200, 1400 and 1500.  The target 1200 is older
     12 # than 1300, therefore nothing is done for it.  The other targets are newer
     13 # than 1300, therefore each of them is made, independently from the other.
     14 
     15 .END:
     16 	@rm -f dep-double-colon-1???
     17 
     18 _!=	touch -t 202001011200 dep-double-colon-1200
     19 _!=	touch -t 202001011300 dep-double-colon-1300
     20 _!=	touch -t 202001011400 dep-double-colon-1400
     21 _!=	touch -t 202001011500 dep-double-colon-1500
     22 
     23 all: dep-double-colon-1300
     24 
     25 dep-double-colon-1300:: dep-double-colon-1200
     26 	: 'Making 1200 ${.TARGET} from ${.ALLSRC} oodate ${.OODATE}'
     27 
     28 dep-double-colon-1300:: dep-double-colon-1400
     29 	: 'Making 1400 ${.TARGET} from ${.ALLSRC} oodate ${.OODATE}'
     30 
     31 dep-double-colon-1300:: dep-double-colon-1500
     32 	: 'Making 1500 ${.TARGET} from ${.ALLSRC} oodate ${.OODATE}'
     33