Ok, so you want the state of make just after parsing finishes. Without patching make or modifying every rule I think your plan for using the printed database is the best you can manage. The database output is quicker to parse than your original makefile usually.
If your makefiles use $(shell) then that might possibly cause trouble with this scheme. Regards, Tim On 6 July 2016 at 07:13, Adrian Muresan <adrianmure...@outlook.com> wrote: > Yes, I am using it and yes the info it gives is very useful, parseable and > excellent in general. > > The problem is that this information is only outputted by `make` AFTER the > makefile is finished executing whereas I need to access this information - > via some function that apparently doesn't exist - BEFORE the makefile rules > start executing so that I can create rules that act on his information. > > As it stands, I'd have to run my build twice: once to get the info and > another time to use the info. > > Given my esoteric task, it's not unreasonable for me to do this. > > 1. Make all > 2. Parse output, generate whatever rules I need -> Generated_Rules.mk > 3. Make all MAKEFILES=Generated_Rules.mk > > > On Jul 5, 2016, at 11:44 PM, Tim Murphy <tnmur...@gmail.com> wrote: > > > > You might want to use makes -p option (--print-data-base) to print out > the targets and prereqs that it has read. The format of this output is > simplified - all variables etc are expanded - so in python it's very easy > to parse. > > > > Regards, > > > > Tim > _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make