Unverified Kaydet (Commit) 29cb50ba authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

[3.6] make tags: index also Modules/_ctypes/ (#4648) (#4659)

* `make tags` fixes (GH-717)

* Fix `make tags` warnings

`make tags` target tries to find C sources and headers in "Grammar" and
"Mac" folders and generates these warnings:

    ctags: Warning: cannot open source file "Grammar/*.[ch]" : No such file or directory
    ctags: Warning: cannot open source file "Mac/*.[ch]" : No such file or directory

This commit changes $SRCDIRS variable in configure.ac to remote these
directories. This variable is used only for tags generation.

Also, "configure" was regenerated with `autoreconf`.

* Fix `make tags` fail on non-default tag names

When ctags overrides default tags filename (e.g. `-f .tags`) `make tags`
is failed because it assumes to see default `tags` filename:

    sort: cannot read: tags: No such file or directory

This commit explicitly specifies "tags" filename for tags generation.

(cherry picked from commit 8a543c0b)

* make tags: index also Modules/_ctypes/ (#4648)

Avoid also "cd $(srcdir)" to not change the current directory.

(cherry picked from commit 3be3b97a)
üst 8cd31082
...@@ -1599,10 +1599,9 @@ autoconf: ...@@ -1599,10 +1599,9 @@ autoconf:
# Create a tags file for vi # Create a tags file for vi
tags:: tags::
cd $(srcdir); \ ctags -w $(srcdir)/Include/*.h
ctags -w Include/*.h; \ for i in $(SRCDIRS); do ctags -f tags -w -a $(srcdir)/$$i/*.[ch]; done
for i in $(SRCDIRS); do ctags -w -a $$i/*.[ch]; \ ctags -f tags -w -a $(srcdir)/Modules/_ctypes/*.[ch]
done; \
LC_ALL=C sort -o tags tags LC_ALL=C sort -o tags tags
# Create a tags file for GNU Emacs # Create a tags file for GNU Emacs
......
...@@ -16553,7 +16553,7 @@ do ...@@ -16553,7 +16553,7 @@ do
done done
SRCDIRS="Parser Grammar Objects Python Modules Mac Programs" SRCDIRS="Parser Objects Python Modules Programs"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
$as_echo_n "checking for build directories... " >&6; } $as_echo_n "checking for build directories... " >&6; }
for dir in $SRCDIRS; do for dir in $SRCDIRS; do
......
...@@ -5302,7 +5302,7 @@ do ...@@ -5302,7 +5302,7 @@ do
done done
AC_SUBST(SRCDIRS) AC_SUBST(SRCDIRS)
SRCDIRS="Parser Grammar Objects Python Modules Mac Programs" SRCDIRS="Parser Objects Python Modules Programs"
AC_MSG_CHECKING(for build directories) AC_MSG_CHECKING(for build directories)
for dir in $SRCDIRS; do for dir in $SRCDIRS; do
if test ! -d $dir; then if test ! -d $dir; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment