]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] tests: avoid spurious error with ctags from older Emacs and XEmacs
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 11 Aug 2012 21:53:20 +0000 (23:53 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 11 Aug 2012 21:53:20 +0000 (23:53 +0200)
* t/ctags.sh: Here.  Those ctags (from Emacs 22.3 and XEmacs 21.5)
apparently have problems grasping "#define" in header files; feed
them an inline function instead.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/ctags.sh

index f3f8a6a5d94f7017c39300ff1d2c0eac8b4e2abf..bbbb22d0564dccdde9503828246ff207e8d2d668 100755 (executable)
@@ -44,7 +44,7 @@ test-ctags: ctags
        grep 'main' sub1/tags
        grep 'choke_me' sub1/tags && exit 1; :
        grep 'subsub/foo\.h' sub2/tags
-       grep 'DUMMY_DUMMY' sub2/tags
+       grep 'IsBigger' sub2/tags
        grep 'bar\.f77' sub2/subsub/tags
        grep 'foo\.cxx' sub2/subsub/tags
        grep 'foo\.h' sub2/subsub/tags && exit 1; :
@@ -71,7 +71,9 @@ cat > sub2/Makefile.am << 'END'
 SUBDIRS = subsub .
 noinst_HEADERS = subsub/foo.h
 subsub/foo.h:
-       echo '#define DUMMY_DUMMY 0' >$@
+       # Use and inlined function, not a #define, for the sake of
+       # Emacs an XEmacs ctags (at least up to versions 22 and 23).
+       echo 'inline int IsBigger (int a, int b) { return (a > b); }' >$@
 CLEANFILES = $(noinst_HEADERS)
 END