Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create etc/emacs/run-etags.sh to make argument processing clear #1765

Merged
merged 2 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Makefile.coq.local
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ ALECTRYON_EXTRAFLAGS ?=
# setting TIMING=1. By doing so here we get the same effect.
TIMING ?= 1

ETAGS ?= etags

CATEGORY_VFILES = $(filter theories/Categories%.v, $(VFILES))
CORE_VFILES = $(filter-out $(CATEGORY_VFILES),$(filter theories/%.v, $(VFILES)))
CONTRIB_VFILES = $(filter contrib/%.v, $(VFILES))
Expand Down Expand Up @@ -242,7 +240,7 @@ dot-file-dep-graphs: $(ALL_DOTFILES)
# The TAGS file
TAGS_FILES = $(ALL_VFILES)
TAGS : $(TAGS_FILES)
$(ETAGS) --language=none $(shell cat etc/emacs/etags-args) $^
./etc/emacs/run-etags.sh $^
jdchristensen marked this conversation as resolved.
Show resolved Hide resolved

# We separate things to work around `make: execvp: /bin/bash: Argument list too long`
clean::
Expand Down
7 changes: 5 additions & 2 deletions dune
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@
(alias emacs)
(mode promote)
(deps
etc/emacs/run-etags.sh
jdchristensen marked this conversation as resolved.
Show resolved Hide resolved
%{bin:etags}
(glob_files_rec ./*.v))
(:vfile
(glob_files_rec theories/*.v)
(glob_files_rec contrib/*.v)))
(action
(run etags --language=none %{read:etc/emacs/etags-args} %{deps})))
(run etc/emacs/run-etags.sh %{vfile})))
2 changes: 0 additions & 2 deletions etc/emacs/etags-args

This file was deleted.

2 changes: 2 additions & 0 deletions etc/emacs/run-etags.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
etags --language=none -r '/^[ \t]*\(\(Local\|Global\|Cumulative\|NonCumulative\|Monomorphic\|Polymorphic\|Private\)[ \t]+\)*\(Axiom\|Theorem\|Class\|Instance\|Let\|Ltac\|Definition\|Lemma\|Record\|Remark\|Structure\|Fixpoint\|Fact\|Corollary\|Inductive\|CoInductive\|Proposition\)[ \t]+\([a-zA-Z0-9_'\'']+\)/\4/' -r '/^[ \t]*\([a-zA-Z0-9_'\'']+\)[ \t]*:/\1/' "$@"
Loading