Commit Diff


commit - 9906b0239cb903ff69f889213dcdf4008e6849e1
commit + b2ea22d36378a1c0e86d7875ea8415df6ee2e1a8
blob - dd833bd21abadcc5ae1233441e1e4a3df647df82
blob + 60b1abe6f2de664b24315821a249eaf4b228a380
--- make/TODO.md
+++ make/TODO.md
@@ -50,9 +50,6 @@ Maybe consider something like this too: `.SUBDIRS: may
 
 
 # Special macros
-## `$*`
-Basename
-
 ## Optional: `${@F}`, `${@D}`, `${<F}`, `${<F}`, `${*F}`, `${*D}`, `${^F}`, `${^D}`
 Filename or Directory portions of the variables.
 
blob - 448ec2e051212d2a81d32c7621f18b1d2e4f9b87
blob + 80e350796bb8fa7f844a829b63b22cedcbfaf4c8
--- make/make.c
+++ make/make.c
@@ -895,6 +895,9 @@ struct expand_ctx *ctx;
  * ${name:H}		replace each word with its dirname() equvialent
  * ${name:T}		replace each word with its basename() equvialent
  * ${name:m1:m2...}	multiple modifiers can be combined
+ * TODO:
+ * ${name:Mpattern}	select only words that match pattern
+ * ${name:Npattern}	opposite of :Mpattern
  */
 subst2 (out, sc, prefix, s, ctx)
 str_t *out;
@@ -1105,6 +1108,7 @@ struct path *prefix;
 char **s;
 struct expand_ctx *ctx;
 {
+	char *t;
 	int ch;
 
 	ch = **s;
@@ -1124,6 +1128,10 @@ struct expand_ctx *ctx;
 		break;
 	case '^':
 		expand_special_into (out, sc, prefix, ".ALLSRC", ctx);
+		break;
+	case '*':
+		t = ".IMPSRC:T}";
+		subst2 (out, sc, prefix, &t, ctx);
 		break;
 	case '{':
 		subst2 (out, sc, prefix, s, ctx);