bug-make
[Top][All Lists]
Advanced

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

Re: Patch to allow make to load plugins that add new functions.


From: Samkit Jain
Subject: Re: Patch to allow make to load plugins that add new functions.
Date: Sat, 12 May 2012 00:04:58 +0530

I have been breaking my head over a simple thing of measuring the progress of build i.e. I wanted to know how many files are supposed to be built and how many are already built till now giving an idea of how much more time I would have to wait.
The only way I could think of this was to have hook/callback support from make internally to makefile scripts or a plugin for things like "file added as prerequisite", "prerequisite is newer than target", "prerequisite is not newer than target".
Would the plugin approach be able to help in with this kind of requests? It would be great if plugin can redirect calls to makefile rather than having everything inside itself which might be c/c++ and sometimes too much to write compared to precise/smaller make language.

With my above proposal:

1. A hook in makefile/plugin for "file added as prerequisite" will be invoked during first phase of make.
2. A hook in makefile/plugin for "prerequisite is newer than target" will be invoked during the second phase of make.
3. A hook in makefile/plugin for "prerequisite is not newer than target" will be invoked during the second phase of make.

Now inside the hook, a simple linear equation can be written to provide the measure of progress. In the example above, it can be "1 - 2 - 3" files are remaining to be built.

I am not familiar with make code base so my requirement might be very ambitious but nevertheless I want to put my point forward.

--
- Samkit

reply via email to

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