help-make
[Top][All Lists]
Advanced

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

Re: Gnu make source code


From: Dan Kegel
Subject: Re: Gnu make source code
Date: Sat, 4 Jan 2014 07:38:22 -0800

On Fri, Jan 3, 2014 at 5:05 PM, Mohamed Horani <address@hidden> wrote:
> i couldn't determine the beginning and the end of the source file so it was
> a bad start for me.
> i wanna a clue how to start reading the source package of GNU Make ?!

Look for the function main().
And/or single-step through it with a debugger until you see what's going on.

> Second i noticed the source package written in multi-programming language
> e.g. m4 files something looks like that
>
> isnt it written purely in C programming language ?!

The .m4 files are just for its build system.  They help detect
and adapt to the system you're building make on.  See
http://en.wikipedia.org/wiki/Autoconf
but you can just ignore them for now.

> Third there is an option -j so i can compile most of  packages in parallel ?
>
> Where i can find the -j option code in the source file ?!

$ make --help | grep j
  -j [N], --jobs[=N] N Aufträge auf einmal zulassen; ohne Argument
unendlich viele Aufträge.
$ grep -R -C 1 '"jobs"' .
./main.c-    { 'j', positive_int, (char *) &job_slots, 1, 1, 0, (char
*) &inf_jobs,
./main.c:      (char *) &default_job_slots, "jobs" },
./main.c-    { CHAR_MAX+2, string, (char *) &jobserver_fds, 1, 1, 0, 0, 0,
$ grep -R -l job_slots .
./ChangeLog
./job.h
./main.c
./vmsjobs.c
./make.h
./remote-cstms.c
./commands.c
./job.c
./remake.c

Does that help?
- Dan



reply via email to

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