Skip to content

Commit

Permalink
Merge branch 'jc/make-tags'
Browse files Browse the repository at this point in the history
* jc/make-tags:
  Makefile: ask "ls-files" to list source files if available
  • Loading branch information
Junio C Hamano committed Oct 21, 2011
2 parents 8d3c0cb + 3353397 commit 1020fbc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)):\
Expand Down

0 comments on commit 1020fbc

Please sign in to comment.