Menu

#40 Fix potential infinite loop in Makefiles

open
None
5
2008-10-15
2005-06-27
No

Despite the patch applied in version 1.12 of the
top-level Makefile there is still a risk of an infinite
loop (albeit much less likely). This risk will be there
as long as the command is:

cd $$dir; $(MAKE) $@

This is because if cd fails (e.g. due to permission
problems) we will run make anyway in the same
directory. The only fix is to write:

cd $$dir && $(MAKE) $@

Also it's possible to simplify the check that the make
command failed which leads us to the following:

(cd $$dir && $(MAKE) $@) || exit 1

All together this gives us the attached patch.

Changelog:

* Makefile
Francois Gouget <fgouget@codeweavers.com>
Make sure there can be no infinite loop.
Simplify the code checking whether make failed.

Discussion

  • Francois Gouget

    Francois Gouget - 2005-06-27

    itcl.diff

     
  • David Gravereaux

    Jeff, is this issue still valid?

     
  • David Gravereaux

    • assigned_to: nobody --> hobbs
     

Log in to post a comment.