Improve automatic variables during secondary expansion

2019-07-13 Thread Mike Haboustak
I'm working on a project[1] that would benefit from using $< and $^ during secondary expansion. Unfortunately, they're not very usable currently. I have a relatively simple patch that I think improves several issues. It's a breaking change, but the end behavior seems consistent with user expectati

[bug #28456] Expansion of $$< is incorrect

2019-07-11 Thread Mike Haboustak
Follow-up Comment #7, bug #28456 (project make): I've encountered this inconsistency when trying to use secondary expansion. When a default rule is not defined, any rule without a recipe has $< overridden with $@. I've added a patch that avoids comparing null file commands and a regression test.

[bug #28456] Expansion of $$< is incorrect

2019-07-11 Thread Mike Haboustak
Additional Item Attachment, bug #28456 (project make): File name: se_default.mk Size:0 KB ___ Reply to this item at:

[PATCH] Fix memory leak of prereqs created for second expansion

2019-07-11 Thread Mike Haboustak
When second expansion is enabled, the record_files function allocates a struct dep for each dependency string that requires expansion. Later, the expand_deps function completes the expansion, parses new prereqs, and frees the dependency string, but it does not free the dependency struct. This resul