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.
Commit
ebb67be487235a0f99feb3c0fec492063b5b4f6841de911c892069cde8861f28
Parent
3c0565ab5e9725b…
2 files changed
+9
+3
+9
| --- Makefile.in | ||
| +++ Makefile.in | ||
| @@ -47,18 +47,27 @@ | ||
| 47 | 47 | USE_LINENOISE = @USE_LINENOISE@ |
| 48 | 48 | USE_MMAN_H = @USE_MMAN_H@ |
| 49 | 49 | USE_SEE = @USE_SEE@ |
| 50 | 50 | FOSSIL_ENABLE_MINIZ = @FOSSIL_ENABLE_MINIZ@ |
| 51 | 51 | APPNAME = fossil |
| 52 | + | |
| 53 | +.PHONY: all tags | |
| 52 | 54 | |
| 53 | 55 | include $(SRCDIR)/main.mk |
| 54 | 56 | |
| 55 | 57 | distclean: clean |
| 56 | 58 | -rm -f autoconfig.h config.log Makefile |
| 59 | + -rm -f cscope.out tags | |
| 57 | 60 | |
| 58 | 61 | reconfig: |
| 59 | 62 | @AUTOREMAKE@ |
| 63 | + | |
| 64 | +tags: | |
| 65 | + ctags -R @srcdir@/src | |
| 66 | +ifeq (@HAVE_PROG_CSCOPE@, 1) | |
| 67 | + cscope -bR -s@srcdir@/src | |
| 68 | +endif | |
| 60 | 69 | |
| 61 | 70 | # Automatically reconfigure whenever an autosetup file or one of the |
| 62 | 71 | # make source files change. |
| 63 | 72 | # |
| 64 | 73 | # The "touch" is necessary to avoid a make loop due to a new upstream |
| 65 | 74 |
| --- 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 |
M
auto.def
+3
| --- auto.def | ||
| +++ auto.def | ||
| @@ -33,10 +33,13 @@ | ||
| 33 | 33 | cc-check-types uint32_t uint16_t int16_t uint8_t |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | # Use pread/pwrite system calls in place of seek + read/write if possible |
| 37 | 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] | |
| 38 | 41 | |
| 39 | 42 | # Find tclsh for the test suite. |
| 40 | 43 | # |
| 41 | 44 | # We can't use jimsh for this: the test suite uses features of Tcl that |
| 42 | 45 | # Jim doesn't support, either statically or due to the way it's built by |
| 43 | 46 |
| --- 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 |