[Top][All Lists]

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

a small suggestion to make

From: gan_xiao_jun
Subject: a small suggestion to make
Date: Sat, 23 Oct 2004 18:02:29 -0700 (PDT)

Hi Mr Smith,

I am struggle in Windows and Macintosh for some years
without touch make, and turn to linux last year for
work reason. And now I become a linux fun and GNUmake
fun. :-)
During my work, I encount some trouble in locate the
error in makefile:
If the include begin with "-" or the shell command
begin with "@", then make output only give the error
target, without more information.
I also found there are some other complain in internet
about --debug or -p output information is not readable
or enough for makefile developer. :-(
To me, there are two information is important:
1. what the shell command is execute.
2. which makefile the current shell command locate in.
These two information are very useful to quickly
locate error when project has complex
makefile and when error happens.
I try as following and think it can solve this problem
temporary although it is rought
for I am not very familiar with make:
I download make-3.79.1.tar.gz from your site. and
modify start_job_command in job.c
Add following code just before child_execute_job:

        int i=0;
        fprintf (stdout,_("\nlocate===>`%s', line
        for(i =0; argv[i]!=0;i++)
                fprintf(stdout,"%s ",(argv[i]));
        child_execute_job (child->good_stdin ? 0 :
bad_stdin, 1,

I try it as follow                                    
I modify /usr/src/linux-2.4.20-8/Rules.make', line 129
change mkdep to mkdep1 to create a make error, old way
can't locate error quickly.
Now based on following information in new make,
locate===>`/usr/src/linux-2.4.20-8/Rules.make', line
command===>/bin/sh -c
/usr/src/linux-2.4.20-8/scripts/mkdep1 -D__KERNEL__
-I/usr/src/linux-2.4.20-8/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2
-fno-common -fomit-frame-pointer -pipe
-mpreferred-stack-boundary=2 -march=i686  -nostdinc
-iwithprefix include -- acct.c capability.c context.c
cpufreq.c dma.c exec_domain.c exit.c fork.c futex.c
info.c itimer.c kallsyms.c kksymoops.c kmod.c ksyms.c
lowlat.c module.c panic.c pid.c pm.c printk.c
profile.c ptrace.c resource.c sched.c signal.c
softirq.c sys.c sysctl.c time.c timer.c uid16.c user.c
> .depend
I can quickly locate it. And I also not worry about
"-" before include and "@" before command.
So I thing it may be better to add a flag to support
detail information for makefile developer.(This is
only a small suggest for I know any modification may
create trouble to stable project:-)
Best regards

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

reply via email to

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