Skip to content

Commit

Permalink
[m0] move tags to separate makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
gerdr committed Jun 6, 2012
1 parent 818a18e commit e61cf8f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 34 deletions.
35 changes: 1 addition & 34 deletions src/m0/c/Makefile
Expand Up @@ -11,37 +11,4 @@ m0-debug : m0.h interp.c mob.c ops.c
clean:
rm -f *.o m0 m0-debug

tags-emacs: tags.emacs.dummy
rm -f TAGS
ctags -e \
--links=no --totals \
-R --exclude=blib --exclude=.git \
--languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \
-I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK,ARGFREE,ARGFREE_NOTNULL \
.

# this works with an old etags (XEmacs 21.5*)
tags-xemacs: tags.emacs.dummy
rm -f TAGS
find . \
-name \*.c -o -name \*.h -o -name \*.pmc -o -name \*.ops | etags -l c - -o TAGS

tags.emacs.dummy:

# vim ctags
# this needs exuberant-ctags

tags-vi: tags.vi.dummy
rm -f tags
ctags \
--links=no --totals \
-R --exclude=blib --exclude=.git \
--languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \
-I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK,ARGFREE,ARGFREE_NOTNULL

tags.vi.dummy:

tags: tags.dummy
@echo 'There is no "tags" target. You want tags-vi or tags-emacs.'

tags.dummy:
include tags.mk
34 changes: 34 additions & 0 deletions src/m0/c/tags.mk
@@ -0,0 +1,34 @@
tags-emacs: tags.emacs.dummy
rm -f TAGS
ctags -e \
--links=no --totals \
-R --exclude=blib --exclude=.git \
--languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \
-I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK,ARGFREE,ARGFREE_NOTNULL \
.

# this works with an old etags (XEmacs 21.5*)
tags-xemacs: tags.emacs.dummy
rm -f TAGS
find . \
-name \*.c -o -name \*.h -o -name \*.pmc -o -name \*.ops | etags -l c - -o TAGS

tags.emacs.dummy:

# vim ctags
# this needs exuberant-ctags

tags-vi: tags.vi.dummy
rm -f tags
ctags \
--links=no --totals \
-R --exclude=blib --exclude=.git \
--languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \
-I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK,ARGFREE,ARGFREE_NOTNULL

tags.vi.dummy:

tags: tags.dummy
@echo 'There is no "tags" target. You want tags-vi or tags-emacs.'

tags.dummy:

0 comments on commit e61cf8f

Please sign in to comment.