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