On Wed, Apr 27, 2011 at 10:04 AM, Prasad Joshi <prasadjoshi124@xxxxxxxxx> wrote: > On Wed, Apr 27, 2011 at 5:48 PM, loody <miloody@xxxxxxxxx> wrote: >> Hi all: >> I found the compile message of kernel is quite succinct, when we set >> V=0, and I try to make my project output as clean as kernel did. >> >> Then I traced the Makefile and it just define "quiet" and "Q" then export it. >> Where is the exact place that quiet build begin? >> >> Is that complicated to copy this quiet-build process? > > Here is a simple way to do it > > Makefile: > ifeq ($(strip $(V)),) > E = @echo > Q = @ > else > E = @\# > Q = > endif > export E Q > > %.o: %.c > $(E) " CC " $@ > $(Q) $(CC) -c $(CFLAGS) $< -o $@ > > > So when V is defined, the make command will display the detailed > compilation message or else it will only show an echoed message. One > can also add a check for verbose level. You may also want to do something like the following: .SILENT: %.o: %.c echo " CC $<" $(CC) -g -c $< -o $@ -- Dean _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies