@@ -1,125 +0,0 @@
1−diff -rc job.c job.c
2−*** job.c 2006-03-20 04:03:04.000000000 +0100
3−--- job.c 2009-01-19 19:37:28.000000000 +0100
4−***************
5−*** 1083,1089 ****
6− appear. */
7−
8− message (0, (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag))
9−! ? "%s" : (char *) 0, p);
10−
11− /* Tell update_goal_chain that a command has been started on behalf of
12− this target. It is important that this happens here and not in
13−--- 1083,1089 ----
14− appear. */
15−
16− message (0, (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag))
17−! ? (enable_nested_output ? "\e[3s\e[a%s\e[b" : "%s") : (char *) 0, p);
18−
19− /* Tell update_goal_chain that a command has been started on behalf of
20− this target. It is important that this happens here and not in
21−diff -rc main.c main.c
22−*** main.c 2006-03-20 03:36:37.000000000 +0100
23−--- main.c 2009-01-19 19:41:41.000000000 +0100
24−***************
25−*** 886,891 ****
26−--- 886,900 ----
27− }
28−
29−
30−+ static void close_nesting()
31−+ {
32−+ while (stdout_nesting_level--)
33−+ printf("\e[q");
34−+ while (stderr_nesting_level--)
35−+ fprintf(stderr, "\e[q");
36−+ }
37−+
38−+
39− #ifdef _AMIGA
40− int
41− main (int argc, char **argv)
42−***************
43−*** 931,936 ****
44−--- 940,950 ----
45− atexit (close_stdout);
46− #endif
47−
48−+ atexit(close_nesting);
49−+
50−+ if (getenv("NIX_INDENT_MAKE"))
51−+ enable_nested_output = 1;
52−+
53− /* Needed for OS/2 */
54− initialize_main(&argc, &argv);
55−
56−***************
57−*** 3095,3100 ****
58−--- 3109,3120 ----
59−
60− /* Use entire sentences to give the translators a fighting chance. */
61−
62−+ if (entering && enable_nested_output)
63−+ {
64−+ printf("\e[p");
65−+ stdout_nesting_level++;
66−+ }
67−+
68− if (makelevel == 0)
69− if (starting_directory == 0)
70− if (entering)
71−***************
72−*** 3124,3129 ****
73−--- 3144,3159 ----
74− printf (_("%s[%u]: Leaving directory `%s'\n"),
75− program, makelevel, starting_directory);
76−
77−+ if (!entering && enable_nested_output)
78−+ {
79−+ printf("\e[q");
80−+ stdout_nesting_level--;
81−+ }
82−+
83− /* Flush stdout to be sure this comes before any stderr output. */
84− fflush (stdout);
85− }
86−+
87−+ int enable_nested_output = 0;
88−+ int stdout_nesting_level = 0;
89−+ int stderr_nesting_level = 0;
90−diff -rc make.h
91−*** make.h 2006-02-16 00:54:43.000000000 +0100
92−--- make.h 2009-01-19 19:32:03.000000000 +0100
93−***************
94−*** 609,611 ****
95−--- 609,614 ----
96− #define ENULLLOOP(_v,_c) do{ errno = 0; \
97− while (((_v)=_c)==0 && errno==EINTR); }while(0)
98−
99−+ extern int enable_nested_output;
100−+ extern int stdout_nesting_level;
101−+ extern int stderr_nesting_level;
102−diff -rc reremake.c
103−*** remake.c 2006-03-20 03:36:37.000000000 +0100
104−--- remake.c 2009-01-19 19:39:40.000000000 +0100
105−***************
106−*** 1120,1126 ****
107−--- 1120,1137 ----
108− /* The normal case: start some commands. */
109− if (!touch_flag || file->cmds->any_recurse)
110− {
111−+ if (enable_nested_output)
112−+ {
113−+ log_working_directory (1);
114−+ fprintf(stderr, "\e[pbuilding %s\n", file->name);
115−+ stderr_nesting_level++;
116−+ }
117− execute_file_commands (file);
118−+ if (enable_nested_output)
119−+ {
120−+ fprintf(stderr, "\e[q");
121−+ stderr_nesting_level--;
122−+ }
123− return;
124− }
125−