Blame SOURCES/make-4.2-trace.patch

b7955a
diff -Nrup a/debug.h b/debug.h
b7955a
--- a/debug.h	2016-02-28 12:48:44.000000000 -0500
b7955a
+++ b/debug.h	2017-06-11 10:22:11.180077939 -0400
b7955a
@@ -20,6 +20,9 @@ this program.  If not, see 
b7955a
 #define DB_JOBS         (0x004)
b7955a
 #define DB_IMPLICIT     (0x008)
b7955a
 #define DB_MAKEFILES    (0x100)
b7955a
+#define DB_CALL       (0x01000)
b7955a
+#define DB_EVAL       (0x02000)
b7955a
+
b7955a
 
b7955a
 #define DB_ALL          (0xfff)
b7955a
 
b7955a
diff -Nrup a/function.c b/function.c
b7955a
--- a/function.c	2016-05-21 16:22:32.000000000 -0400
b7955a
+++ b/function.c	2017-06-11 10:35:13.563174482 -0400
b7955a
@@ -26,6 +26,7 @@ this program.  If not, see 
b7955a
 #include "amiga.h"
b7955a
 #endif
b7955a
 
b7955a
+static int depth = 0;
b7955a
 
b7955a
 struct function_table_entry
b7955a
   {
b7955a
@@ -1400,7 +1401,12 @@ func_eval (char *o, char **argv, const c
b7955a
 
b7955a
   install_variable_buffer (&buf, &len;;
b7955a
 
b7955a
+  depth += 1;
b7955a
+  DBS( DB_EVAL, ("### eval -->\n"));
b7955a
+  DB( DB_EVAL, ("%s\n", argv[0]));
b7955a
   eval_buffer (argv[0], NULL);
b7955a
+  DBS( DB_EVAL, ("### eval <--\n"));
b7955a
+  depth -= 1;
b7955a
 
b7955a
   restore_variable_buffer (buf, len);
b7955a
 
b7955a
@@ -2584,6 +2590,7 @@ func_call (char *o, char **argv, const c
b7955a
   if (v == 0 || *v->value == '\0')
b7955a
     return o;
b7955a
 
b7955a
+  depth += 1;
b7955a
   body = alloca (flen + 4);
b7955a
   body[0] = '$';
b7955a
   body[1] = '(';
b7955a
@@ -2591,6 +2598,8 @@ func_call (char *o, char **argv, const c
b7955a
   body[flen+2] = ')';
b7955a
   body[flen+3] = '\0';
b7955a
 
b7955a
+  DBS(DB_CALL, ("### call %s -->\n", body));
b7955a
+
b7955a
   /* Set up arguments $(1) .. $(N).  $(0) is the function name.  */
b7955a
 
b7955a
   push_new_variable_scope ();
b7955a
@@ -2600,6 +2609,7 @@ func_call (char *o, char **argv, const c
b7955a
       char num[11];
b7955a
 
b7955a
       sprintf (num, "%d", i);
b7955a
+      DBS(DB_CALL, ("### arg %i for call %s is '%s'\n", i, body, *argv));
b7955a
       define_variable (num, strlen (num), *argv, o_automatic, 0);
b7955a
     }
b7955a
 
b7955a
@@ -2613,6 +2623,7 @@ func_call (char *o, char **argv, const c
b7955a
       char num[11];
b7955a
 
b7955a
       sprintf (num, "%d", i);
b7955a
+      DBS(DB_CALL, ("### arg %i for call %s is implicit\n", i, body));
b7955a
       define_variable (num, strlen (num), "", o_automatic, 0);
b7955a
     }
b7955a
 
b7955a
@@ -2623,7 +2634,14 @@ func_call (char *o, char **argv, const c
b7955a
 
b7955a
   saved_args = max_args;
b7955a
   max_args = i;
b7955a
+
b7955a
   o = variable_expand_string (o, body, flen+3);
b7955a
+  DBS(DB_CALL, ("### call to %s expended into\n", body));
b7955a
+  DB(DB_CALL, ("%s\n", o));
b7955a
+  DBS(DB_CALL, ("### call %s <--\n", body));
b7955a
+
b7955a
+  depth -= 1;
b7955a
+
b7955a
   max_args = saved_args;
b7955a
 
b7955a
   v->exp_count = 0;
b7955a
diff -Nrup a/main.c b/main.c
b7955a
--- a/main.c	2017-06-11 10:20:12.053504852 -0400
b7955a
+++ b/main.c	2017-06-11 10:28:37.914642751 -0400
b7955a
@@ -755,6 +755,12 @@ decode_debug_flags (void)
b7955a
               case 'b':
b7955a
                 db_level |= DB_BASIC;
b7955a
                 break;
b7955a
+              case 'c':
b7955a
+                db_level |= DB_CALL;
b7955a
+                break;
b7955a
+              case 'e':
b7955a
+                db_level |= DB_EVAL;
b7955a
+                break;
b7955a
               case 'i':
b7955a
                 db_level |= DB_BASIC | DB_IMPLICIT;
b7955a
                 break;