1# $NetBSD: varname-circumflex.mk,v 1.1 2025/06/27 20:20:56 rillig Exp $ 2# 3# Tests for the target-local variable "^", which is required by POSIX 2024 4# and provided by GNU make. 5 6# TODO: Support $^. 7 8all: .PHONY 9all: no_prerequisites prerequisite 10all: unique duplicate 11all: dir_part file_part 12all: implicit.tout 13all: wait 14 15.if defined(^) 16. error 17.endif 18 19no_prerequisites: 20 @echo $@: $^ 21 22prerequisite: file1.o 23 @echo $@: $^ 24 25unique: file1.o file2.o file3.o 26 @echo $@: $^ 27 28duplicate: file1.o file2.o file3.o file3.o 29 @echo $@: $^ 30 31dir_part: /usr/include/stdio.h /usr/include/unistd.h foo.h 32 @echo $@: $(^D) 33 34file_part: /usr/include/stdio.h /usr/include/unistd.h foo.h 35 @echo $@: ${^F} 36 37wait: file1.o .WAIT file2.o 38 @echo $@: $^ 39 40.SUFFIXES: 41.SUFFIXES: .tin .tout 42 43.tin.tout: 44 @echo $@: $^ 45 46file1.o file2.o file3.o: 47/usr/include/stdio.h /usr/include/unistd.h foo.h implicit.tin: 48