Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Patch proposal for bug 44134

Hi Sean,

The second minus sign should be deleted; that is:
        -cd <dep_project_build_dir> && -$(MAKE) clean all
should read:
        -cd <dep_project_build_dir> && $(MAKE) clean all

The initial minus sign is consumed by Make. The rest of the line, after 
macro expansion, is passed on to the shell which would interpret 
unsuccessfully the second minus sign as a command:
        /bin/sh: -: not found 

Otherwise, this is a clever low-risk change to a bad problem.

- Brent




Sean Evoy/Ottawa/IBM@IBMCA 
Sent by: cdt-dev-admin@xxxxxxxxxxx
10/03/2003 05:00 PM
Please respond to
cdt-dev@xxxxxxxxxxx


To
cdt-dev@xxxxxxxxxxx
cc

Subject
[cdt-dev] Patch proposal for bug 44134






Hi All,
I have a simple patch proposal for a critical bug, 44134. The problem lies
in how the makefile is generated when a build target references other
projects. The makefile creates a command to change to the build directory
of the referenced project and call $(MAKE) there, i.e.

cd <dep_project_build_dir>; $(MAKE) clean all

The problem arises when the directory change fails. As of RC0, the command
after the semi-colon is evaluated. Unfortunately, it evaluates to a
recursive make call in the build directory of the build target and 'make'
will keep invoking more 'make's until Eclipse runs out of memory. With a
manual build, the user can still cancel the build. When autobuild is
turned on, they cannot. The only way to shut down Eclipse under that
scenario is to kill it, and when it restarts, autobuild is still enabled
and the problem repeats.

The best solution is to ignore dependencies on empty projects, but the
simplest (and more generally applicable) solution is to NOT perform the
'make' command if the 'cd' fails, i.e.

cd <dep_project_build_dir> && $(MAKE) clean all

When the dependencies are generated this way, the 'cd' will fail as will
the build. The final tweak is to ignore the 'cd' failure and allow the
rest of the build to continue, i.e.

-cd <dep_project_build_dir> && -$(MAKE) clean all

I think that this is a legitimate problem that is severe enough to justify
a new RC. The patch amounts to a 2-line change in my code, and has no
impact on the rest of the build system.

I would like to get a committer vote on this proposal. I have included the
patch so you can evaluate the delta.

Thanks,

Sean Evoy
Rational Software - IBM Software Group
Ottawa, Ontario, Canada




#### cdt-managedbuilder-core-patch.txt has been removed from this note on 
October 06, 2003 by Brent Nicolle



Back to the top