From 1524edc13bd1444a88dca99b5f8ed0ef7b0ca0c4 Mon Sep 17 00:00:00 2001 From: Raphael Wimmer Date: Mon, 19 Mar 2018 11:35:22 +0100 Subject: [PATCH] correctly describe "$*", remove incorrect "$%" As documented in the [GNU Make manual](https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html), `$%` is only used for files within archive files (which is a feature rarely used in my opinion). The automatic variable `$*` represents the matched part in implicit rules (%.o: %.c), e.g., "foo" for "foo.c". --- makefile.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/makefile.md b/makefile.md index 1eea16207..eacf7094b 100644 --- a/makefile.md +++ b/makefile.md @@ -21,13 +21,12 @@ out.o: src.c src.h $^ # "src.c src.h" (all prerequisites) %.o: %.c - $% # target member name ("foo" in "foo.c") + $* # the 'stem' with which an implicit rule matches ("foo" in "foo.c") also: $+ # prerequisites (all, with duplication) $? # prerequisites (new ones) $| # prerequisites (order-only?) - $* # basename without extension of the target (?) $(@D) # target directory ```