* [PATCH] makefile: Add a cscope target
@ 2007-10-05 22:33 Kristof Provost
2007-10-06 1:04 ` Frank Lichtenheld
2007-10-06 8:23 ` Alex Riesen
0 siblings, 2 replies; 5+ messages in thread
From: Kristof Provost @ 2007-10-05 22:33 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]
The current makefile supports ctags but not cscope. Some people prefer
cscope (I do), so this patch adds a cscope target.
Signed-off-by: Kristof Provost <Kristof@provost-engineering.be>
---
diff --git a/Makefile b/Makefile
index 8db4dbe..42c9e94 100644
--- a/Makefile
+++ b/Makefile
@@ -947,6 +947,10 @@ tags:
$(RM) tags
$(FIND) . -name '*.[hcS]' -print | xargs ctags -a
+cscope:
+ $(RM) cscope*
+ $(FIND) . -name '*.hcS]' -print | xargs cscope -b
+
### Detect prefix changes
TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
$(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
@@ -1093,7 +1097,7 @@ clean:
$(LIB_FILE) $(XDIFF_LIB)
$(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X
$(RM) $(TEST_PROGRAMS)
- $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags
+ $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
$(RM) -r autom4te.cache
$(RM) configure config.log config.mak.autogen config.mak.append config.status config.cache
$(RM) -r $(GIT_TARNAME) .doc-tmp-dir
@@ -1111,7 +1115,7 @@ endif
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS
.PHONY: all install clean strip
-.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags .FORCE-GIT-CFLAGS
+.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
### Check documentation
#
--
Kristof
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] makefile: Add a cscope target
2007-10-05 22:33 [PATCH] makefile: Add a cscope target Kristof Provost
@ 2007-10-06 1:04 ` Frank Lichtenheld
2007-10-06 14:24 ` Kristof Provost
2007-10-06 8:23 ` Alex Riesen
1 sibling, 1 reply; 5+ messages in thread
From: Frank Lichtenheld @ 2007-10-06 1:04 UTC (permalink / raw)
To: Kristof Provost; +Cc: git
On Sat, Oct 06, 2007 at 12:33:36AM +0200, Kristof Provost wrote:
> +cscope:
> + $(RM) cscope*
> + $(FIND) . -name '*.hcS]' -print | xargs cscope -b
missing [
Gruesse,
--
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] makefile: Add a cscope target
2007-10-06 1:04 ` Frank Lichtenheld
@ 2007-10-06 14:24 ` Kristof Provost
2007-10-07 20:45 ` Kristof Provost
0 siblings, 1 reply; 5+ messages in thread
From: Kristof Provost @ 2007-10-06 14:24 UTC (permalink / raw)
To: Frank Lichtenheld; +Cc: git, Alex Riesen
[-- Attachment #1: Type: text/plain, Size: 1934 bytes --]
On 2007-10-06 03:04:37 (+0200), Frank Lichtenheld <frank@lichtenheld.de> wrote:
> On Sat, Oct 06, 2007 at 12:33:36AM +0200, Kristof Provost wrote:
> > +cscope:
> > + $(RM) cscope*
> > + $(FIND) . -name '*.hcS]' -print | xargs cscope -b
>
>
> missing [
Well, that will teach me to post patches after midnight.
Here's a fixed version. I've also added cscope* to the .gitignore file.
For some reason tags and TAGS weren't in there either so I've added them
too.
Signed-off-by: Kristof Provost <Kristof@provost-engineering.be>
---
diff --git a/.gitignore b/.gitignore
index e0b91be..62afef2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -171,3 +171,6 @@ config.status
config.mak.autogen
config.mak.append
configure
+tags
+TAGS
+cscope*
diff --git a/Makefile b/Makefile
index 8db4dbe..e2790c8 100644
--- a/Makefile
+++ b/Makefile
@@ -947,6 +947,10 @@ tags:
$(RM) tags
$(FIND) . -name '*.[hcS]' -print | xargs ctags -a
+cscope:
+ $(RM) cscope*
+ $(FIND) . -name '*.[hcS]' -print | xargs cscope -b
+
### Detect prefix changes
TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
$(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
@@ -1093,7 +1097,7 @@ clean:
$(LIB_FILE) $(XDIFF_LIB)
$(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X
$(RM) $(TEST_PROGRAMS)
- $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags
+ $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
$(RM) -r autom4te.cache
$(RM) configure config.log config.mak.autogen config.mak.append config.status config.cache
$(RM) -r $(GIT_TARNAME) .doc-tmp-dir
@@ -1111,7 +1115,7 @@ endif
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS
.PHONY: all install clean strip
-.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags .FORCE-GIT-CFLAGS
+.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
### Check documentation
#
--
Kristof
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] makefile: Add a cscope target
2007-10-06 14:24 ` Kristof Provost
@ 2007-10-07 20:45 ` Kristof Provost
0 siblings, 0 replies; 5+ messages in thread
From: Kristof Provost @ 2007-10-07 20:45 UTC (permalink / raw)
To: Frank Lichtenheld; +Cc: git, Alex Riesen
The current makefile supports ctags but not cscope. Some people prefer
cscope (I do), so this patch adds a cscope target.
Signed-off-by: Kristof Provost <Kristof@provost-engineering.be>
---
This version of the patch includes the fix for the missing [ Frank spotted,
and adds 'cscope*' to the .gitignore list as Alex suggested.
While I did that I noticed that 'tags' and 'TAGS' were also missing.
It's also in the (hopefully) right format. Thank to Johannes Schindelin
for pointing out my mistakes.
.gitignore | 3 +++
Makefile | 8 ++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index e0b91be..62afef2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -171,3 +171,6 @@ config.status
config.mak.autogen
config.mak.append
configure
+tags
+TAGS
+cscope*
diff --git a/Makefile b/Makefile
index 8db4dbe..e2790c8 100644
--- a/Makefile
+++ b/Makefile
@@ -947,6 +947,10 @@ tags:
$(RM) tags
$(FIND) . -name '*.[hcS]' -print | xargs ctags -a
+cscope:
+ $(RM) cscope*
+ $(FIND) . -name '*.[hcS]' -print | xargs cscope -b
+
### Detect prefix changes
TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
$(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
@@ -1093,7 +1097,7 @@ clean:
$(LIB_FILE) $(XDIFF_LIB)
$(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X
$(RM) $(TEST_PROGRAMS)
- $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags
+ $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
$(RM) -r autom4te.cache
$(RM) configure config.log config.mak.autogen config.mak.append config.status config.cache
$(RM) -r $(GIT_TARNAME) .doc-tmp-dir
@@ -1111,7 +1115,7 @@ endif
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS
.PHONY: all install clean strip
-.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags .FORCE-GIT-CFLAGS
+.PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
### Check documentation
#
--
1.5.3.4.207.g1aae
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] makefile: Add a cscope target
2007-10-05 22:33 [PATCH] makefile: Add a cscope target Kristof Provost
2007-10-06 1:04 ` Frank Lichtenheld
@ 2007-10-06 8:23 ` Alex Riesen
1 sibling, 0 replies; 5+ messages in thread
From: Alex Riesen @ 2007-10-06 8:23 UTC (permalink / raw)
To: Kristof Provost; +Cc: git
Kristof Provost, Sat, Oct 06, 2007 00:33:36 +0200:
> +cscope:
> + $(RM) cscope*
You may want to add the cscope* to .gitignore
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-07 20:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-05 22:33 [PATCH] makefile: Add a cscope target Kristof Provost
2007-10-06 1:04 ` Frank Lichtenheld
2007-10-06 14:24 ` Kristof Provost
2007-10-07 20:45 ` Kristof Provost
2007-10-06 8:23 ` Alex Riesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).