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

 
 

You are not allowed to post comments on this tracker with your current authentification 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: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating 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).

http://www.gnu.org/software/make/manual/html_node/Remaking-Makefiles.html#Remaking-Makefiles 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 http://www.gnu.org/software/make/manual/html_node/Avoiding-Compilation.html#Avoiding-Compilation 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: https://alioth.debian.org/tracker/index.php?func=detail&aid=311886&group_id=100114&atid=413095

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 Makefile.am 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
  • -unavailable- added by ericb (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup