mainmake - 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

Submitter:  Eric Blake <ericb>
Submitted:  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).

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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code