mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Add TAGS rule [ci skip]
This commit is contained in:
parent
8ce2fb9bbb
commit
63e1769b16
2 changed files with 22 additions and 0 deletions
|
@ -269,6 +269,7 @@ HELP_EXTRA_TASKS = \
|
||||||
" checkout-github: checkout GitHub Pull Request [PR=1234]" \
|
" checkout-github: checkout GitHub Pull Request [PR=1234]" \
|
||||||
" pull-github: rebase GitHub Pull Request to new worktree [PR=1234]" \
|
" pull-github: rebase GitHub Pull Request to new worktree [PR=1234]" \
|
||||||
" update-github: merge master branch and push it to Pull Request [PR=1234]" \
|
" update-github: merge master branch and push it to Pull Request [PR=1234]" \
|
||||||
|
" tags: generate TAGS file" \
|
||||||
""
|
""
|
||||||
|
|
||||||
# 1. squeeze spaces
|
# 1. squeeze spaces
|
||||||
|
@ -505,3 +506,6 @@ matz: up
|
||||||
-e "s/^\(#define RUBY_ABI_VERSION\) .*/\1 0/" \
|
-e "s/^\(#define RUBY_ABI_VERSION\) .*/\1 0/" \
|
||||||
$(files:%=$(srcdir)/%)
|
$(files:%=$(srcdir)/%)
|
||||||
$(GIT) -C $(srcdir) commit -m "$(message)" $(files)
|
$(GIT) -C $(srcdir) commit -m "$(message)" $(files)
|
||||||
|
|
||||||
|
tags:
|
||||||
|
$(MAKE) GIT="$(GIT)" -C "$(srcdir)" -f defs/tags.mk
|
||||||
|
|
18
defs/tags.mk
Normal file
18
defs/tags.mk
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# -*- mode: makefile-gmake; indent-tabs-mode: t -*-
|
||||||
|
|
||||||
|
SRCS := $(shell $(GIT) ls-files \
|
||||||
|
*.[chy] *.def *.inc *.rb \
|
||||||
|
ccan/ coroutine/ include/ internal/ missing/ \
|
||||||
|
'enc/**/*.[ch]' 'win32/**/*.[ch]' \
|
||||||
|
)
|
||||||
|
|
||||||
|
TAGS: $(SRCS)
|
||||||
|
@echo updating $@
|
||||||
|
@tmp=$$(mktemp); \
|
||||||
|
trap 'rm -f "$$tmp"' 0; \
|
||||||
|
{ \
|
||||||
|
$(GIT) grep -h --no-line-number -o '^ *# *define *RBIMPL_ATTR_[A-Z_]*(*' -- include | \
|
||||||
|
sed 's/^ *# *define *//;/_H$$/d;y/(/+/' | sort -u && \
|
||||||
|
echo 'NORETURN+'; \
|
||||||
|
} > "$$tmp" && \
|
||||||
|
ctags -e -I@"$$tmp" -h .def.inc --langmap=c:+.y.def.inc $(^)
|
Loading…
Add table
Add a link
Reference in a new issue