mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
add ctags and etags support to Makefile
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
45
Makefile
45
Makefile
@@ -293,6 +293,14 @@ _all: all
|
|||||||
|
|
||||||
all: cleantest depend asterisk subdirs
|
all: cleantest depend asterisk subdirs
|
||||||
|
|
||||||
|
ifneq ($(wildcard tags),)
|
||||||
|
all: tags
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(wildcard TAGS),)
|
||||||
|
all: TAGS
|
||||||
|
endif
|
||||||
|
|
||||||
noclean: depend asterisk subdirs
|
noclean: depend asterisk subdirs
|
||||||
|
|
||||||
editline/config.h:
|
editline/config.h:
|
||||||
@@ -314,6 +322,10 @@ ifneq ($(wildcard .depend),)
|
|||||||
include .depend
|
include .depend
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(wildcard .tags-depend),)
|
||||||
|
include .tags-depend
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: _version
|
.PHONY: _version
|
||||||
|
|
||||||
_version:
|
_version:
|
||||||
@@ -369,6 +381,7 @@ clean:
|
|||||||
rm -f build.h
|
rm -f build.h
|
||||||
rm -f ast_expr.c
|
rm -f ast_expr.c
|
||||||
rm -f .version
|
rm -f .version
|
||||||
|
rm -f .tags-depend .tags-sources tags TAGS
|
||||||
@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
|
@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
|
||||||
@if [ -d mpg123-0.59r ]; then $(MAKE) -C mpg123-0.59r clean; fi
|
@if [ -d mpg123-0.59r ]; then $(MAKE) -C mpg123-0.59r clean; fi
|
||||||
$(MAKE) -C db1-ast clean
|
$(MAKE) -C db1-ast clean
|
||||||
@@ -646,6 +659,33 @@ depend: .depend
|
|||||||
.depend:
|
.depend:
|
||||||
./mkdep ${CFLAGS} `ls *.c`
|
./mkdep ${CFLAGS} `ls *.c`
|
||||||
|
|
||||||
|
.tags-depend:
|
||||||
|
@echo -n ".tags-depend: " > $@
|
||||||
|
@find . -maxdepth 1 -name \*.c -printf "\t%p \\\\\n" >> $@
|
||||||
|
@find . -maxdepth 1 -name \*.h -printf "\t%p \\\\\n" >> $@
|
||||||
|
@find ${SUBDIRS} -name \*.c -printf "\t%p \\\\\n" >> $@
|
||||||
|
@find ${SUBDIRS} -name \*.h -printf "\t%p \\\\\n" >> $@
|
||||||
|
@find include -name \*.h -printf "\t%p \\\\\n" >> $@
|
||||||
|
@echo >> $@
|
||||||
|
|
||||||
|
.tags-sources:
|
||||||
|
@rm -f $@
|
||||||
|
@find . -maxdepth 1 -name \*.c -print >> $@
|
||||||
|
@find . -maxdepth 1 -name \*.h -print >> $@
|
||||||
|
@find ${SUBDIRS} -name \*.c -print >> $@
|
||||||
|
@find ${SUBDIRS} -name \*.h -print >> $@
|
||||||
|
@find include -name \*.h -print >> $@
|
||||||
|
|
||||||
|
tags: .tags-depend .tags-sources
|
||||||
|
ctags -L .tags-sources -o $@
|
||||||
|
|
||||||
|
ctags: tags
|
||||||
|
|
||||||
|
TAGS: .tags-depend .tags-sources
|
||||||
|
etags -o $@ `cat .tags-sources`
|
||||||
|
|
||||||
|
etags: TAGS
|
||||||
|
|
||||||
FORCE:
|
FORCE:
|
||||||
|
|
||||||
%_env:
|
%_env:
|
||||||
@@ -656,7 +696,7 @@ env:
|
|||||||
|
|
||||||
# If the cleancount has been changed, force a make clean.
|
# If the cleancount has been changed, force a make clean.
|
||||||
# .cleancount is the global clean count, and .lastclean is the
|
# .cleancount is the global clean count, and .lastclean is the
|
||||||
# last clean count # we had
|
# last clean count we had
|
||||||
# We can avoid this by making noclean
|
# We can avoid this by making noclean
|
||||||
|
|
||||||
cleantest:
|
cleantest:
|
||||||
@@ -678,7 +718,6 @@ patchlist:
|
|||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
apply:
|
apply:
|
||||||
@if [ -z "$(PATCH)" ]; then \
|
@if [ -z "$(PATCH)" ]; then \
|
||||||
echo "Usage: make PATCH=<patchname> apply"; \
|
echo "Usage: make PATCH=<patchname> apply"; \
|
||||||
@@ -707,5 +746,3 @@ unapply:
|
|||||||
else \
|
else \
|
||||||
echo "No such patch $(PATCH) in patches directory"; \
|
echo "No such patch $(PATCH) in patches directory"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user