Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make Apply realpath() to p before matching against m...



details:   https://anonhg.NetBSD.org/src/rev/9c33f91c9c0e
branches:  trunk
changeset: 815289:9c33f91c9c0e
user:      sjg <sjg%NetBSD.org@localhost>
date:      Tue May 10 00:02:31 2016 +0000

description:
Apply realpath() to p before matching against metaIgnorePaths.

diffstat:

 usr.bin/make/meta.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (32 lines):

diff -r 3242b042cdae -r 9c33f91c9c0e usr.bin/make/meta.c
--- a/usr.bin/make/meta.c       Mon May 09 22:34:37 2016 +0000
+++ b/usr.bin/make/meta.c       Tue May 10 00:02:31 2016 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.54 2016/03/11 07:01:21 sjg Exp $ */
+/*      $NetBSD: meta.c,v 1.55 2016/05/10 00:02:31 sjg Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -1205,14 +1205,16 @@
                     * be part of the dependencies because
                     * they are _expected_ to change.
                     */
-                   if (*p == '/' &&
-                       Lst_ForEach(metaIgnorePaths, prefix_match, p)) {
+                   if (*p == '/') {
+                       realpath(p, fname1); /* clean it up */
+                       if (Lst_ForEach(metaIgnorePaths, prefix_match, fname1)) {
 #ifdef DEBUG_META_MODE
-                       if (DEBUG(META))
-                           fprintf(debug_file, "meta_oodate: ignoring: %s\n",
-                                   p);
+                           if (DEBUG(META))
+                               fprintf(debug_file, "meta_oodate: ignoring: %s\n",
+                                       p);
 #endif
-                       break;
+                           break;
+                       }
                    }
 
                    /*



Home | Main Index | Thread Index | Old Index