]> granicus.if.org Git - python/commitdiff
[3.6] make tags: index also Modules/_ctypes/ (#4648) (#4659)
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 30 Nov 2017 22:34:21 +0000 (23:34 +0100)
committerGitHub <noreply@github.com>
Thu, 30 Nov 2017 22:34:21 +0000 (23:34 +0100)
* `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 8a543c0bc7347d5b333f334d157bf4a7cd33c14a)

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

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

(cherry picked from commit 3be3b97a9709d3cd5303175ddbffa7dcca57ac3e)

Makefile.pre.in
configure
configure.ac

index 2b647a8e5885f9c37c01d36857409e3ca196388d..5e88e3f6aa1ec0b0716030f724cae8c9905c697a 100644 (file)
@@ -1599,10 +1599,9 @@ autoconf:
 
 # Create a tags file for vi
 tags::
-       cd $(srcdir); \
-       ctags -w Include/*.h; \
-       for i in $(SRCDIRS); do ctags -w -a $$i/*.[ch]; \
-       done; \
+       ctags -w $(srcdir)/Include/*.h
+       for i in $(SRCDIRS); do ctags -f tags -w -a $(srcdir)/$$i/*.[ch]; done
+       ctags -f tags -w -a $(srcdir)/Modules/_ctypes/*.[ch]
        LC_ALL=C sort -o tags tags
 
 # Create a tags file for GNU Emacs
index 24d86f59ebcbeaf636e985fc9bfe8d0396ad8fc3..ea1baef55d3035259760bb0fd17bed083fa61903 100755 (executable)
--- a/configure
+++ b/configure
@@ -16553,7 +16553,7 @@ do
 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_n "checking for build directories... " >&6; }
 for dir in $SRCDIRS; do
index 9a784e4636f125761545adfb21a5d7b3e5b04c22..fc1dba6b029158a9e9c89417c38e40b77e210ee1 100644 (file)
@@ -5302,7 +5302,7 @@ do
 done
 
 AC_SUBST(SRCDIRS)
-SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
+SRCDIRS="Parser Objects Python Modules Programs"
 AC_MSG_CHECKING(for build directories)
 for dir in $SRCDIRS; do
     if test ! -d $dir; then