help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch to improve BSD make compatibility


From: Jos Backus
Subject: Patch to improve BSD make compatibility
Date: Sat, 1 Jun 2002 00:49:37 -0700
User-agent: Mutt/1.3.99i

Here's the patch. I have already tried to convince the FreeBSD people to adopt
a similar patch (to make BSD make accept $^ as an alias for ^>) but that
attempt has failed. Please ask if you are interested.

--- expand.c.orig       Mon Jun 19 13:23:35 2000
+++ expand.c    Sat Jun  1 00:42:11 2002
@@ -373,6 +373,11 @@
 
          /* A $ followed by a random char is a variable reference:
             $a is equivalent to $(a).  */
+
+         /* Treat $> as $^ for compatibility with BSD make. */ 
+         if (*p == '>')
+           *p = '^';
+
          {
            /* We could do the expanding here, but this way
               avoids code repetition at a small performance cost.  */

Thanks for considering this enhancement.

-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
address@hidden     _/_/   _/_/_/            use Std::Disclaimer;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]