This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
About the procedure of fixinclude in building gcc
- From: "Cheng bin" <amker dot cheng at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 1 Dec 2008 21:42:06 +0800
- Subject: About the procedure of fixinclude in building gcc
Hi All:
Now I am working on the procedure of fixinclude in building gcc
and got following concepts.
Take three PATH as example to illustrate,
ginclude : which provided by gcc source includes system
headers wanted by gcc;
sys_inc : the location of system header files;
local : the locattion for system headers fixed by gcc;
When building gcc, there are two steps to finish the job of fixing headers:
STEP1: fixinc.sh will fix system headers in PATH: sys_inc and put
fixed ones into
PATH:local ;
STEP2: gcc(actually is building makefiles) will copy all files from
PATH:ginclude to
PATH:local. In this step, it will copy anything into
PATH:local even if there
is one as the result of STEP1.
After all, gcc will search system headers in PATH:local firstly and
then in PATH:sys_inc.
I'am not sure about my comprehension, am I right?
And there is a question about ./fixincludes/Makefile.
I think the gcc's top level Makefile will configure fixincludes and
create that Makefile,
and then will do such "make ./fixincludes/Makefile" thing, But I found
following rules in
./fixincludes/Makefile:
all : oneprocess fixinc.sh mkheaders
fixinc.sh : fixinc.in mkfixinc.sh Makefile
(commands to create fixinc.sh)
Makefile: $(srcdir)/Makefile.in config.status
$(SHELL) ./config.status Makefile
Look at the last rule with target Makefile, does it recreate exactly
this Makefile recursively?
And why doing this?
I have to admit that I know nothing about config.status except
comments say that it is used
to recreate the current configuration.
Thanks for look at this message, and any suggestion will be greatly appreciated!