aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-21 16:04:35 -0700
committerJunio C Hamano <gitster@pobox.com>2011-10-21 16:04:35 -0700
commit1020fbc2485d6c1c144d321b68fcf37269e67917 (patch)
tree3f98f1b4fabc754ab0116c5d155789c308dab5de /Makefile
parent8d3c0cb08dff78dfa36544f6bc720ac46cf743aa (diff)
parent335339758c48ed17c8eb34437269e821824f577b (diff)
downloadgit-1020fbc2485d6c1c144d321b68fcf37269e67917.tar.gz
git-1020fbc2485d6c1c144d321b68fcf37269e67917.tar.xz
Merge branch 'jc/make-tags'
* jc/make-tags: Makefile: ask "ls-files" to list source files if available
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 17404c43d..3139c19b1 100644
--- a/Makefile
+++ b/Makefile
@@ -2127,17 +2127,21 @@ po/git.pot: $(LOCALIZED_C)
pot: po/git.pot
+FIND_SOURCE_FILES = ( git ls-files '*.[hcS]' 2>/dev/null || \
+ $(FIND) . \( -name .git -type d -prune \) \
+ -o \( -name '*.[hcS]' -type f -print \) )
+
$(ETAGS_TARGET): FORCE
$(RM) $(ETAGS_TARGET)
- $(FIND) . -name '*.[hcS]' -print | xargs etags -a -o $(ETAGS_TARGET)
+ $(FIND_SOURCE_FILES) | xargs etags -a -o $(ETAGS_TARGET)
tags: FORCE
$(RM) tags
- $(FIND) . -name '*.[hcS]' -print | xargs ctags -a
+ $(FIND_SOURCE_FILES) | xargs ctags -a
cscope:
$(RM) cscope*
- $(FIND) . -name '*.[hcS]' -print | xargs cscope -b
+ $(FIND_SOURCE_FILES) | xargs cscope -b
### Detect prefix changes
TRACK_CFLAGS = $(CC):$(subst ','\'',$(ALL_CFLAGS)):\