Makefile change to restart bootstraps
Raja R Harinath
harinath@cs.umn.edu
Mon Nov 13 13:59:00 GMT 2000
Hi,
Alexandre Oliva <aoliva@redhat.com> writes:
> On Nov 13, 2000, Raja R Harinath <harinath@cs.umn.edu> wrote:
> > Wouldn't it be simpler if the 'stage_a' or whatever target depended
> > on all the C source files. This would automatically restart the
> > bootstrap if any of the sources changed.
>
> I thought about that, but I rejected it because there may be times
> when you don't want to restart the bootstrap, but proceed from the
> stage in which you are. But that may work, indeed.
The default should be to do the right thing, which for 'make
bootstrap' would be to start from the beginning if any source
changes.
If you want to restart in the middle even if some file changes, you
could touch the appropriate 'stage_?' file. To skip the stage1 build,
I think you do
touch stage_a stage_b
and to skip the stage2 build, you would do
touch stage_c stage_d
If they were more mnemonic, you could do something like:
touch build_stage1 # skip building stage1 compiler. Assume xgcc is stage1
touch done_stage1 # Assume stage1/xgcc is uptodate
Also, based on an off-line comment from D.J.Delorie, it may be useful
to change
stage_a:
$(MAKE) CC="$(CC)" ... LANGUAGES="$(BOOT_LANGUAGES)"
touch stage_a
to
build_stage1: $(ALL_BOOT_LANGUAGE_SOURCE_FILES)
## there may be some things that need to be cleaned up
make clean
$(MAKE) CC="$(CC)" ... LANGUAGES="$(BOOT_LANGUAGES)"
touch build_stage1
And, maybe add a $(ALL_LANGUAGE_SOURCE_FILES) dependency to 'stage_c'
and 'stage_e' (renamed to build_stage2 and build_stage3 resp.).
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash
More information about the Gcc
mailing list