aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLee Duhem <lee.duhem@gmail.com>2014-11-26 11:48:07 +0800
committerLee Duhem <lee.duhem@gmail.com>2014-11-28 23:25:05 +0800
commit73e8f6b60a208259fd7396949485333709a073db (patch)
tree2f6f51762922c741e5ffbd2021f775c9dbfff7d5 /Makefile
parent4ae462b6683d3452e399caad9fc07c23e04dc9d1 (diff)
downloadtinycc-73e8f6b60a208259fd7396949485333709a073db.tar.gz
tinycc-73e8f6b60a208259fd7396949485333709a073db.tar.bz2
Makefile: Add rules to create tags and TAGS.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 7796883..1d90ded 100644
--- a/Makefile
+++ b/Makefile
@@ -346,7 +346,8 @@ export LIBTCC1
$(MAKE) -C tests $@ 'PROGS_CROSS=$(PROGS_CROSS)'
clean:
- rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.exe libtcc_test$(EXESUF)
+ rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.log \
+ *.exe a.out tags TAGS libtcc_test$(EXESUF)
$(MAKE) -C tests $@
ifneq ($(LIBTCC1),)
$(MAKE) -C lib $@
@@ -359,6 +360,12 @@ config.mak:
@echo "Please run ./configure."
@exit 1
+tags:
+ ctags $(top_srcdir)/*.[ch] $(top_srcdir)/include/*.h $(top_srcdir)/lib/*.[chS]
+
+TAGS:
+ ctags -e $(top_srcdir)/*.[ch] $(top_srcdir)/include/*.h $(top_srcdir)/lib/*.[chS]
+
# create release tarball from *current* git branch (including tcc-doc.html
# and converting two files to CRLF)
TCC-VERSION := tcc-$(shell cat $(top_srcdir)/VERSION)
@@ -373,6 +380,6 @@ tar: tcc-doc.html
rm -rf $(TCC-VERSION)
git reset
-.PHONY: all clean tar distclean install uninstall FORCE
+.PHONY: all clean tar tags TAGS distclean install uninstall FORCE
endif # ifeq ($(TOP),.)