summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--variable.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/variable.c b/variable.c
index de35602..e6f2c87 100644
--- a/variable.c
+++ b/variable.c
@@ -381,12 +381,12 @@ define_automatic_variables ()
/* Define the magic D and F variables in terms of
the automatic variables they are variations of. */
- define_variable ("@D", 2, "$(dir $@)", o_automatic, 1);
- define_variable ("%D", 2, "$(dir $%)", o_automatic, 1);
- define_variable ("*D", 2, "$(dir $*)", o_automatic, 1);
- define_variable ("<D", 2, "$(dir $<)", o_automatic, 1);
- define_variable ("?D", 2, "$(dir $?)", o_automatic, 1);
- define_variable ("^D", 2, "$(dir $^)", o_automatic, 1);
+ define_variable ("@D", 2, "$(patsubst %/,%,$(dir $@))", o_automatic, 1);
+ define_variable ("%D", 2, "$(patsubst %/,%,$(dir $%))", o_automatic, 1);
+ define_variable ("*D", 2, "$(patsubst %/,%,$(dir $*))", o_automatic, 1);
+ define_variable ("<D", 2, "$(patsubst %/,%,$(dir $<))", o_automatic, 1);
+ define_variable ("?D", 2, "$(patsubst %/,%,$(dir $?))", o_automatic, 1);
+ define_variable ("^D", 2, "$(patsubst %/,%,$(dir $^))", o_automatic, 1);
define_variable ("@F", 2, "$(notdir $@)", o_automatic, 1);
define_variable ("%F", 2, "$(notdir $%)", o_automatic, 1);
define_variable ("*F", 2, "$(notdir $*)", o_automatic, 1);