Fossil SCM

Added a top-level "tags" Makefile target for updating a Vim tags file using Exuberant Ctags (requires -R feature). It also updates a cscope file if we find cscope at configuration time. One so interested could add etags support to this as well.

wyoung 2020-05-27 17:56 trunk
Commit ebb67be487235a0f99feb3c0fec492063b5b4f6841de911c892069cde8861f28
2 files changed +9 +3
--- Makefile.in
+++ Makefile.in
@@ -47,18 +47,27 @@
4747
USE_LINENOISE = @USE_LINENOISE@
4848
USE_MMAN_H = @USE_MMAN_H@
4949
USE_SEE = @USE_SEE@
5050
FOSSIL_ENABLE_MINIZ = @FOSSIL_ENABLE_MINIZ@
5151
APPNAME = fossil
52
+
53
+.PHONY: all tags
5254
5355
include $(SRCDIR)/main.mk
5456
5557
distclean: clean
5658
-rm -f autoconfig.h config.log Makefile
59
+ -rm -f cscope.out tags
5760
5861
reconfig:
5962
@AUTOREMAKE@
63
+
64
+tags:
65
+ ctags -R @srcdir@/src
66
+ifeq (@HAVE_PROG_CSCOPE@, 1)
67
+ cscope -bR -s@srcdir@/src
68
+endif
6069
6170
# Automatically reconfigure whenever an autosetup file or one of the
6271
# make source files change.
6372
#
6473
# The "touch" is necessary to avoid a make loop due to a new upstream
6574
--- Makefile.in
+++ Makefile.in
@@ -47,18 +47,27 @@
47 USE_LINENOISE = @USE_LINENOISE@
48 USE_MMAN_H = @USE_MMAN_H@
49 USE_SEE = @USE_SEE@
50 FOSSIL_ENABLE_MINIZ = @FOSSIL_ENABLE_MINIZ@
51 APPNAME = fossil
 
 
52
53 include $(SRCDIR)/main.mk
54
55 distclean: clean
56 -rm -f autoconfig.h config.log Makefile
 
57
58 reconfig:
59 @AUTOREMAKE@
 
 
 
 
 
 
60
61 # Automatically reconfigure whenever an autosetup file or one of the
62 # make source files change.
63 #
64 # The "touch" is necessary to avoid a make loop due to a new upstream
65
--- Makefile.in
+++ Makefile.in
@@ -47,18 +47,27 @@
47 USE_LINENOISE = @USE_LINENOISE@
48 USE_MMAN_H = @USE_MMAN_H@
49 USE_SEE = @USE_SEE@
50 FOSSIL_ENABLE_MINIZ = @FOSSIL_ENABLE_MINIZ@
51 APPNAME = fossil
52
53 .PHONY: all tags
54
55 include $(SRCDIR)/main.mk
56
57 distclean: clean
58 -rm -f autoconfig.h config.log Makefile
59 -rm -f cscope.out tags
60
61 reconfig:
62 @AUTOREMAKE@
63
64 tags:
65 ctags -R @srcdir@/src
66 ifeq (@HAVE_PROG_CSCOPE@, 1)
67 cscope -bR -s@srcdir@/src
68 endif
69
70 # Automatically reconfigure whenever an autosetup file or one of the
71 # make source files change.
72 #
73 # The "touch" is necessary to avoid a make loop due to a new upstream
74
+3
--- auto.def
+++ auto.def
@@ -33,10 +33,13 @@
3333
cc-check-types uint32_t uint16_t int16_t uint8_t
3434
}
3535
3636
# Use pread/pwrite system calls in place of seek + read/write if possible
3737
define USE_PREAD [cc-check-functions pread]
38
+
39
+# If we have cscope here, we'll use it in the "tags" target
40
+define HAVE_PROG_CSCOPE [cc-check-progs cscope]
3841
3942
# Find tclsh for the test suite.
4043
#
4144
# We can't use jimsh for this: the test suite uses features of Tcl that
4245
# Jim doesn't support, either statically or due to the way it's built by
4346
--- auto.def
+++ auto.def
@@ -33,10 +33,13 @@
33 cc-check-types uint32_t uint16_t int16_t uint8_t
34 }
35
36 # Use pread/pwrite system calls in place of seek + read/write if possible
37 define USE_PREAD [cc-check-functions pread]
 
 
 
38
39 # Find tclsh for the test suite.
40 #
41 # We can't use jimsh for this: the test suite uses features of Tcl that
42 # Jim doesn't support, either statically or due to the way it's built by
43
--- auto.def
+++ auto.def
@@ -33,10 +33,13 @@
33 cc-check-types uint32_t uint16_t int16_t uint8_t
34 }
35
36 # Use pread/pwrite system calls in place of seek + read/write if possible
37 define USE_PREAD [cc-check-functions pread]
38
39 # If we have cscope here, we'll use it in the "tags" target
40 define HAVE_PROG_CSCOPE [cc-check-progs cscope]
41
42 # Find tclsh for the test suite.
43 #
44 # We can't use jimsh for this: the test suite uses features of Tcl that
45 # Jim doesn't support, either statically or due to the way it's built by
46

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button