On Sun, 25 Jan 2009 14:23:29 +0100 Javier Martín <lordhab...@gmail.com> wrote:
> El dom, 25-01-2009 a las 12:34 +0200, Vesa Jääskeläinen escribió: > > Javier Martín wrote: > > > This patch modifies several files in the build system (mainly common.rmk > > > and genmk.rb) to reduce the general verbosity of the build process to a > > > manageable, semi-informative level. Thus, what currently appears as > > > "gcc" calls, several lines long each is turned into lines like: > > > > > > [M xfs.mod] COMPILE ../src/fs/xfs.c -> > > > xfs_mod-fs_xfs.o > > > > > > [M xfs.mod] LINK xfs_mod-fs_xfs.o -> > > > pre-xfs.o > > > > > > [M xfs.mod] Looking for EXPORTED SYMBOL definitions: pre-xfs.o > > > > > > And so on. The change also makes warning-hunting marginally easier, > > > though not by much since the patch intentionally shows a line for nearly > > > every process that did so previously. This behavior could be simplified > > > further if needed - this post is more of an RFC than anything else. > > > Also, it is by no means thorough or complete - only the most common > > > processes have been addressed - as I'm a bit busy with exams. > > > > > > The patch makes the new behavior the default one, so a new make-time > > > option is added: V (for "verbose"), which must have the value 1 in order > > > to get the behavior, as in "make V=1" > > > > First of all I would like compiling process to be more tidier. > > > > However, what is the difference between Colin's similar patch? > Oops... I did not remember Colin's patch, it's been so long since it was > last discussed that my mind considered it deceased for all intents and > purposes. I'll look into the post history and see what it did compared > to mine - if I get it to compile against a current SVN grub, that is. Basically the difference is that my 'prettymake' patch redefines the program variables like TARGET_CC, etc. so that they cause the echo of a nice like when they are executed. This is the main part of the patch (from Makefile.in) +### Pretty output control ### +# Set up compiler and linker commands that either is quiet (does not print +# the command line being executed) or verbose (print the command line). +_CC := $(CC) +_TARGET_CC := $(TARGET_CC) +_STRIP := $(STRIP) +_GENMODSRC := sh $(srcdir)/genmodsrc.sh +ifeq ($(V),1) + override V_PREFIX := + override CC = $(_CC) + override TARGET_CC = $(_CC) + override STRIP = $(_STRIP) + override GENMODSRC = $(_GENMODSRC) + override INFO_GENCMDLIST = + override INFO_GENFSLIST = + override INFO_GENPARTMAPLIST = + override INFO_GEN_FINAL_COMMAND_LIST = + override INFO_GEN_FINAL_FS_LIST = + override INFO_GEN_FINAL_PARTMAP_LIST = +else + override V_PREFIX := @ + override CC = @echo "COMPILE $<"; $(_CC) + override TARGET_CC = @echo "COMPILE(TARGET) $<"; $(_TARGET_CC) + override STRIP = @echo "STRIP $@"; $(_STRIP) + override GENMODSRC = @echo "GENMODSRC $@"; $(_GENMODSRC) + override INFO_GENCMDLIST = @echo "GENCMDLIST $@" + override INFO_GENFSLIST = @echo "GENFSLIST $@" + override INFO_GENPARTMAPLIST = @echo "GENPARTMAPLIST $@" + override INFO_GEN_FINAL_COMMAND_LIST = @echo "GENCMDLIST[final] $@" + override INFO_GEN_FINAL_FS_LIST = @echo "GENFSLIST[final] $@" + override INFO_GEN_FINAL_PARTMAP_LIST = @echo "GENPARTMAPLIST[final] $@" +endif I implemented it this way because it was easiest, since I didn't have to hunt down all the usages of the tools to add the output control. This method has downsides, and I think everyone will agree Javier's method is much more robust and more transparent as to what it is doing. Also, my patch no longer works, which shows its fragility: For instance, in current GRUB SVN the value of TARGET_CC is being referenced outside the context of actually executing it (its value is being assigned to another variable). This breaks with my patch because of the way TARGET_CC is redefined. If you want to see my whole patch (against older GRUB SVN -- it doesn't quite work against current GRUB for the reason mentioned above), you can see it at <http://grub.gibibit.com/patches/prettymake_2008-07-04.patch> Regards, Colin
signature.asc
Description: PGP signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel