[Bash-completion-devel] [bash-completion-Bugs][311886] completion for make appears to hang if Makefile is out-of-date

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Tue Jan 19 21:04:25 UTC 2010


Bugs item #311886, was changed at 2009-08-17 18:05 by Ville Skyttä 
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=311886&group_id=100114

Status: Open
Priority: 3
Submitted By: Eric Blake (eblake-guest)
Assigned to: Nobody (None)
Summary: completion for make appears to hang if Makefile is out-of-date 
Distribution: --Distribution-Agnostic--
Originally reported in: None
Milestone: None
Status: None
Original bug number: 


Initial Comment:
If make thinks that Makefile is out-of-date, then the rules to update Makefile are run even when using 'make -qp'.  This is often the case when developing in automake-based projects, and editing a source file like Makefile.am, where the commands to update Makefile include a rerun of the autotools and ./configure, which can take a long time (several seconds), but since _make is piping all output to awk, this means there is no user-visible indication of this reconfigure, so tab-completion appears to hang.

The last two paragraphs of http://www.gnu.org/software/make/manual/html_node/Remaking-Makefiles.html#Remaking-Makefiles are relevant - tab completion on makefiles is one case where you really DO want to avoid updating Makefile, and just grab the set of targets from the current state of Makefile (even if that set would have been updated during the regeneration of Makefile by running make for real).

The fix is that _make should run 'make -qp -C . Makefile' rather than 'make -qp -C .' when querying the set of targets available in ./Makefile, and likewise for GNUmakefile or any file specified by -f.


----------------------------------------------------------------------

>Comment By: Ville Skyttä  (scop-guest)
Date: 2010-01-19 23:04

Message:
At least one annoying/problematic thing with this is that if -f is not given, we'd need to enumerate various makefile names in some order and pick one, which may or may not correspond to the order the invoked make looks for them (e.g. Makefile vs GNUmakefile vs makefile etc if more than one of these is present).

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=311886&group_id=100114



More information about the Bash-completion-devel mailing list