]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Formerly variable.c.~26~
authorRoland McGrath <roland@redhat.com>
Wed, 26 Jan 1994 00:48:30 +0000 (00:48 +0000)
committerRoland McGrath <roland@redhat.com>
Wed, 26 Jan 1994 00:48:30 +0000 (00:48 +0000)
variable.c

index de3560231d4c04b5593a9f86441d533582465bcc..e6f2c87c2d31e88ae214a3ec634908ba7fcff084 100644 (file)
@@ -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);