-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mamake: show an even more useful trace (re: 3bd7e69)
I still wasn't happy with it. It would be nice to trace the rule name/target as well, but doing that on the same line makes the PS4 prefix too long and the trace too hard to read. And the log still looks crowded and hard to read anyway. So, this commit takes an entirely different approach. src/cmd/INIT/mamake.c: - run(): Revert the PS4 changes. - make(): case 'done': Before running each shell action, directly print an empty line (for legibility) followed by trace header to standard error that looks like: # src/cmd/ksh93/Mamfile: 22-1188: ksh ...so, the Mamfile path relative to ${PACKAGEROOT}, the line number range of the make...done block, and the rule target. In the latter, if the target is a canonical path starting with the value of ${INSTALLROOT}, it is rendered like this: # src/lib/libast/Mamfile: 4325-4329: ${INSTALLROOT}/lib/libast.a ...both for brevity and to reflect that this is how the target rules are actually written. - make(): case 'done': Improve the -e ("explain") option: make the presentation match the new trace header and recognise a virtual target (which was previously misexplained as 'target not found'). - update(): Add simple trace header and optional -e explanation for recursive mamake invocations. - main(): Disable state.explain if state.force is active -- this causes -e to be ignored if -F is given (as documented) without checking for !state.force each time state.explain is checked.
- Loading branch information
Showing
2 changed files
with
45 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters