foo/myfile.o: bar/myfile.c myfile.h include1.h include2.h
echo "do something"
foo/myfile.o: bar/myfile.c myfile.h include1.h include2.h
echo "do something"
foo/myfile.o: bar/myfile.c myfile.h include1.h include2.h
echo "do something"
foo/myfile.o: bar/myfile.c myfile.h include1.h include2.h
echo "do something"
.ONESHELL
is defined (see here).foo/myfile.o: bar/myfile.c myfile.h include1.h include2.h
echo "do something"
$@
: The target of the rulefoo/myfile.o: bar/myfile.c myfile.h include1.h include2.h
echo "$@"
$<
: The first prerequisitefoo/myfile.o: bar/myfile.c myfile.h include1.h include2.h
echo "$<"
$?
: All prerequisites that are newer than the targetfoo/myfile.o: bar/myfile.c myfile.h include1.h include2.h echo "$?"
$^
: All prerequisites (no dupplicates)foo/myfile.o: bar/myfile.c myfile.h include1.h include2.h include1.h
echo "$^"
$+
: All prerequisites (with dupplicates)foo/myfile.o: bar/myfile.c myfile.h include1.h include2.h include1.h
echo "$+"
$|
: All order-only prerequisitesfoo/myfile.o: bar/myfile.c myfile.h include1.h include2.h | linux-folder
echo "$|"
$*
: see manuala.%.b: bar/myfile.c myfile.h include1.h include2.h
echo "dir/a.foo.b = $*" # dir/a.foo.b = dir/foo
$(@D)
: The directory part of the file name of the target, with the trailing slash removedfoo/bar/myfile.o: myfile.c myfile.h include1.h include2.h
echo "$(@D)"
$(@F)
: The file-within-directory part of the file name of the targetfoo/bar/myfile.o: myfile.c myfile.h include1.h include2.h
echo "$(@F)"
$(<D)
: The directory part of the first prerequisitemyfile.o: foo/myfile.c bar/myfile.h doo/include1.h dar/include2.h
echo "$(<D)"
$(<F)
: The file-within-directory part of the first prerequisitemyfile.o: foo/myfile.c bar/myfile.h doo/include1.h dar/include2.h
echo "$(<F)"
$(?D)
: Lists of the directory parts of all prerequisites that are newer than the targetmyfile.o: foo/myfile.c bar/myfile.h doo/include1.h dar/include2.h echo "$(?D)"
$(?F)
: Lists of the file-within-directory parts of all prerequisites that are newer than the targetmyfile.o: foo/myfile.c bar/myfile.h doo/include1.h dar/include2.h echo "$(?F)"
$(^D)
: Lists of the directory parts of all prerequisitesmyfile.o: foo/myfile.c bar/myfile.h doo/include1.h dar/include2.h echo "$(^D)"
$(^F)
: Lists of the file-within-directory parts of all prerequisitesmyfile.o: foo/myfile.c bar/myfile.h doo/include1.h dar/include2.h echo "$(^F)"
FORCE
target:
run: $(TARGET) FORCE ./$< | ts %.s FORCE: