Hi,
Attached is a patch that reduces the verbosity of the build system by printing the build commands in one of two formats: COMMAND output_file or COMMAND input_file -> output_file
I hope it meets Alexandre's requirements of not reducing portability of Wine to other platforms (including Windows).
On 5/29/07, Robert Shearman rob@codeweavers.com wrote:
Hi,
Attached is a patch that reduces the verbosity of the build system by printing the build commands in one of two formats: COMMAND output_file or COMMAND input_file -> output_file
I hope it meets Alexandre's requirements of not reducing portability of Wine to other platforms (including Windows).
I get the following (on Slackware 11) while running the make depend portion of ./configure && make depend && make && sudo make install:
make[1]: Entering directory `/home/speeddy/wine-git/tools' ../tools/makedep -C. -S.. -T.. -I/usr/include/freetype2 bin2res.c fnt2bdf.c fnt2fon.c make_ctests.c makedep.c relpath.c sfnt2fnt.c make[1]: Leaving directory `/home/speeddy/wine-git/tools' make[1]: Entering directory `/home/speeddy/wine-git/tools' make[1]: `makedep' is up to date. make[1]: Leaving directory `/home/speeddy/wine-git/tools' make[1]: Entering directory `/home/speeddy/wine-git/dlls' make[2]: Entering directory `/home/speeddy/wine-git/dlls/acledit' ../../tools/makedep -C. -S../.. -T../.. main.c make[2]: Leaving directory `/home/speeddy/wine-git/dlls/acledit' make[2]: Entering directory `/home/speeddy/wine-git/dlls/acledit' make[2]: MAKERULE_MAKEDEP@: Command not found make[2]: *** [depend] Error 127 make[2]: Leaving directory `/home/speeddy/wine-git/dlls/acledit' make[1]: *** [acledit/__depend__] Error 2 make[1]: Leaving directory `/home/speeddy/wine-git/dlls' make: *** [dlls/__depend__] Error 2
Robert Shearman rob@codeweavers.com writes:
Attached is a patch that reduces the verbosity of the build system by printing the build commands in one of two formats: COMMAND output_file or COMMAND input_file -> output_file
I hope it meets Alexandre's requirements of not reducing portability of Wine to other platforms (including Windows).
The MAKEFLAGS stuff is still not portable, and I still think this belongs in make itself.
Here's a quick proof of concept patch against GNU make. It needs a better algorithm for extracting the command name, and some sort of command-line option; this is left as an exercise for the reader.
Index: job.c =================================================================== RCS file: /sources/make/make/job.c,v retrieving revision 1.186 diff -u -p -r1.186 job.c --- job.c 11 May 2007 20:57:21 -0000 1.186 +++ job.c 29 May 2007 21:07:47 -0000 @@ -1079,9 +1079,21 @@ start_job_command (struct child *child) /* Print out the command. If silent, we call `message' with null so it can log the working directory before the command's own error messages appear. */ + { + char *ptr, cmd[128];
- message (0, (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag)) - ? "%s" : (char *) 0, p); + strncpy( cmd, argv[0], sizeof(cmd)-1 ); + cmd[sizeof(cmd)-1] = 0; + if (!strcmp(cmd,"/bin/sh")) + { + if (argv[1] && !strcmp(argv[1],"-c")) strncpy( cmd, argv[2], sizeof(cmd)-1 ); + if ((ptr = strchr( cmd, ' ' ))) *ptr = 0; + } + if ((ptr = strrchr( cmd, '/' ))) memmove( cmd, ptr + 1, strlen(ptr+1) + 1 ); + + message (0, (just_print_flag || (!(flags & COMMANDS_SILENT) && !silent_flag)) + ? "[%s] %s" : (char *) 0, cmd, child->file->name); + }
/* Tell update_goal_chain that a command has been started on behalf of this target. It is important that this happens here and not in
Alexandre Julliard wrote:
Robert Shearman rob@codeweavers.com writes:
Attached is a patch that reduces the verbosity of the build system by printing the build commands in one of two formats: COMMAND output_file or COMMAND input_file -> output_file
I hope it meets Alexandre's requirements of not reducing portability of Wine to other platforms (including Windows).
The MAKEFLAGS stuff is still not portable, and I still think this belongs in make itself.
Here's a quick proof of concept patch against GNU make. It needs a better algorithm for extracting the command name, and some sort of command-line option; this is left as an exercise for the reader.
Thanks, I'll take a look at this when I get a spare moment.
On 5/29/07, Robert Shearman rob@codeweavers.com wrote:
Hi,
Attached is a patch that reduces the verbosity of the build system by printing the build commands in one of two formats: COMMAND output_file or COMMAND input_file -> output_file
I hope it meets Alexandre's requirements of not reducing portability of Wine to other platforms (including Windows).
Well, after applying the patch and doing like Kirill instructed me, it looks pretty good. I just have a couple of nits, and they really can be worked out later on.
1) make depend/make install/make uninstall/make test, etc does not appear "pretty" 2) is there any way to "prettify" the entering/leaving directory messages, I think the 2.6 kernel has it that way, but I'm not 100% sure
Tom Spear wrote:
On 5/29/07, Robert Shearman rob@codeweavers.com wrote:
Hi,
Attached is a patch that reduces the verbosity of the build system by printing the build commands in one of two formats: COMMAND output_file or COMMAND input_file -> output_file
I hope it meets Alexandre's requirements of not reducing portability of Wine to other platforms (including Windows).
Well, after applying the patch and doing like Kirill instructed me, it looks pretty good. I just have a couple of nits, and they really can be worked out later on.
- make depend/make install/make uninstall/make test, etc does not
appear "pretty"
make depend and make test should appear "pretty", but I haven't worked on make install/uninstall yet.
- is there any way to "prettify" the entering/leaving directory
messages, I think the 2.6 kernel has it that way, but I'm not 100% sure
You can use "make --no-print-directory".