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
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to