From: luc <luc.lists@gmail.com>
To: zsh-workers@zsh.org
Subject: Bug in completion for make
Date: Fri, 18 Oct 2013 16:40:22 +0200 [thread overview]
Message-ID: <20131018144022.GA61854@mbp.Speedport_W_700V> (raw)
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
Hello list members,
I'm using zsh 5.0.2 on Mac OSX 10.6 compiled via homebrew. When I
complete targets for one of my makefiles I get some extra suggestions,
which I should not get. I have attached a example makefile to reproduce
the issue.
To reproduce the issue copy the attached makefile to a (new) directory
of your choice and run "make prepare". Then enter "make " and press
CTRL-D. On my system the suggestions are:
1.pdf
2.pdf
3.pdf
\'s\#src/\(.\*\).tex\#1.pdf
\|
clean
files.mk
ls
main
prepare
sed
src/\*.tex
but I expect them to be:
1.pdf
2.pdf
3.pdf
clean
files.mk
main
prepare
I looked at the code of _make and it seems that the error arises when
the makefile is parsed by _make-parseMakefile. The line five of my
example file is misinterpreted because it contains a colon.
_make-parseMakefile therefor thinks it is a line containing a target and
a dependency. The pattern used in _make-parseMakefile (in case ...
esac) is ([[:alnum:]][^$TAB:=]#:[^=]*) . I do not understand why this
matches a line starting with a TAB-character. Sadly I also do not know
how to correct this line.
Do you think this can be fixed?
Best regards
Luc
[-- Attachment #2: makefile --]
[-- Type: text/plain, Size: 300 bytes --]
include files.mk
main:
@echo Compiling main ...
files.mk: $(shell ls -t src/*.tex | head -n 1)
ls src/*.tex | sed 's#src/\(.*\)\.tex#\1.pdf:#' > files.mk
%.pdf: src/%.tex
@echo pdflatex ...
clean:
rm -f files.mk *.pdf
prepare:
mkdir -p src
touch src/1.tex src/2.tex src/3.tex
$(MAKE) files.mk
next reply other threads:[~2013-10-18 14:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 14:40 luc [this message]
2013-10-18 15:32 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131018144022.GA61854@mbp.Speedport_W_700V \
--to=luc.lists@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).