help-make
[Top][All Lists]
Advanced

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

Re: pattern rules with absolute paths and chaining (Was: implicit rules


From: Paul D. Smith
Subject: Re: pattern rules with absolute paths and chaining (Was: implicit rules with absolute paths and chaining (Was: targets starting with '/'))
Date: Tue, 27 Apr 2004 13:29:48 -0400

There is a known issue with GNU make 3.80 where any pattern that refers
to a non-existent directory is dropped.  I'm not sure what the rationale
behind that is, besides efficiency.

But any makefile that relies on real make rules to create directories,
rather than using the $(shell ...) hack, will need this fixed.  It's
been fixed in CVS already.

I attach the patch below.


Index: rule.c
===================================================================
RCS file: /cvsroot/make/make/rule.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -B -b -r1.35 -r1.36
--- rule.c      24 Feb 2004 13:50:22 -0000      1.35
+++ rule.c      22 Mar 2004 15:11:49 -0000      1.36
@@ -135,20 +135,6 @@
                 nonexistent subdirectory.  */
 
              dep->changed = !dir_file_exists_p (name, "");
-#ifdef VMS
-              if (dep->changed && strchr (name, ':') != 0)
-#else
-             if (dep->changed && *name == '/')
-#endif
-               {
-                 /* The name is absolute and the directory does not exist.
-                    This rule can never possibly match, since this dependency
-                    can never possibly exist.  So just remove the rule from
-                    the list.  */
-                 freerule (rule, lastrule);
-                 --num_pattern_rules;
-                 goto end_main_loop;
-               }
            }
          else
            /* This dependency does not reside in a subdirectory.  */
@@ -159,7 +145,6 @@
        max_pattern_deps = ndeps;
 
       lastrule = rule;
-    end_main_loop:
       rule = next;
     }
 
-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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