grub-devel
[Top][All Lists]
Advanced

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

[PATCH] Tidy up 'make' output


From: Colin D Bennett
Subject: [PATCH] Tidy up 'make' output
Date: Tue, 17 Jun 2008 10:44:48 -0700

When thousands of long, wrapped lines full of command line options and
file names are scrolling by on your terminal, it is very hard to pick
out the irregularities in the build process, such as error and warnings.

To make the output of ``make`` easier to parse by eye as it scrolls by,
I added support for "pretty" output for make. 

For example, it replaces the full gcc commands that look like

  gcc -Iutil -I../util -I. -Iinclude -I../include -Wall -W
  -DGRUB_LIBDIR=\"/usr/local/lib/`echo grub/i386-pc | sed 's,x,x,'`\" -g
  -O2 -DGRUB_UTIL=1  -MD -c -o
  grub_setup-util_getroot.o ../util/getroot.c gcc -Ikern -I../kern -I.
  -Iinclude -I../include -Wall -W -DGRUB_LIBDIR=\"/usr/local/lib/`echo
  grub/i386-pc | sed 's,x,x,'`\" -g -O2 -DGRUB_UTIL=1  -MD -c -o
  grub_setup-kern_device.o ../kern/device.c ../kern/device.c: In
  function 'grub_device_iterate': ../kern/device.c:84: warning:
  generating trampoline in object (requires executable
  stack) ../kern/device.c:84: warning: generating trampoline in object
  (requires executable stack) gcc -Ikern -I../kern -I. -Iinclude
  -I../include -Wall -W -DGRUB_LIBDIR=\"/usr/local/lib/`echo
  grub/i386-pc | sed 's,x,x,'`\" -g -O2 -DGRUB_UTIL=1  -MD -c -o
  grub_setup-kern_disk.o ../kern/disk.c gcc -Ikern -I../kern -I.
  -Iinclude -I../include -Wall -W -DGRUB_LIBDIR=\"/usr/local/lib/`echo
  grub/i386-pc | sed 's,x,x,'`\" -g -O2 -DGRUB_UTIL=1  -MD -c -o
  grub_setup-kern_err.o ../kern/err.c gcc -Ikern -I../kern -I. -Iinclude
  -I../include -Wall -W -DGRUB_LIBDIR=\"/usr/local/lib/`echo
  grub/i386-pc | sed 's,x,x,'`\" -g -O2 -DGRUB_UTIL=1  -MD -c -o
  grub_setup-kern_misc.o ../kern/misc.c

with output that, in my opinion, makes it easier to see warnings and
errors:

  COMPILE         ../util/getroot.c
  COMPILE         ../kern/device.c
  ../kern/device.c: In function 'grub_device_iterate':
  ../kern/device.c:84: warning: generating trampoline in object
  (requires executable stack)
  ../kern/device.c:84: warning: generating trampoline in object
  (requires executable stack)
  COMPILE         ../kern/disk.c 
  COMPILE         ../kern/err.c
  COMPILE         ../kern/misc.c

If the variable ``V`` (for verbose) is set to 1, then the traditional
full output is displayed.  This is useful when you need to see which
compiler flags are being used or which source files are being linked
into an object file. Just run

  make V=1

to get the full output.

This patch can be refined further by adding 'pretty' rules for other
build operations to Makefile.in.

Regards,
Colin

Attachment: grub_prettymake_2008-06-17.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]