helpmake - Support: sr #106980, bash completion can appear to hang...


You are not allowed to post comments on this tracker with your current authentication level.

sr #106980: bash completion can appear to hang due to make -qp semantics

Submitted by:  Eric Blake <ericb>
Submitted on:  Fri 14 Aug 2009 06:27:50 PM UTC  
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None

Mon 17 Aug 2009 03:09:53 PM UTC, comment #1:

It turns out the manual documents this after all, but in a different location (so I would like to recategorize this as a documentation bug). had enough details that I was able to figure out the trick of using 'make -qp Makefile' to query the current state of the Makefile without regenerating it.

It would be nice if the node "Avoiding Recompilation" had a link to the section on avoiding remaking Makefile. I filed this report because did not answer my question.

Meanwhile, I have also opened a bug against the bash-completion package to use the documented way of avoiding remaking Makefile during tab completion:

Eric Blake <ericb>
Fri 14 Aug 2009 06:27:50 PM UTC, original submission:

The bash-completion library installs a handler that tries to sniff out all potential make targets, by using 'make -qp'. Unfortunately, since 'make -q' still regenerates Makefile if it is out of date, and also executes lines that begin with + or contain $(MAKE), this can make tab-completion appear to hang if things are out of date and a long operation is started under the hood (as is often the case if you touch in an automake-based project). In isolation, it is correct for -q to still execute special lines (in fact, this is specified by POSIX); but when used with the GNU extension of -p, I think it would make more sense for the presence of -p to imply that we really are only interested in querying state, and that even recursive makes should be skipped even if the current Makefile is out of date. Or at least create a new command line option (rather than changing the existing meaning of -p) so that bash-completion can REALLY get a no-op query of the make targets.

Eric Blake <ericb>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by ericb (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.3