History

Makefile: Add rules to create tags and TAGS.

Lee Duhem committed 11 years ago

Commit 73e8f6b1 parent 4ae462b1 file · +9 −2Browse files

Unified · Split

Makefile+9−2
@@ -346,7 +346,8 @@ export LIBTCC1 · 345 unmodified lines
346346 $(MAKE) -C tests $@ 'PROGS_CROSS=$(PROGS_CROSS)'
347347
348348 clean:
349− rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.exe libtcc_test$(EXESUF)
349+ rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.log \
350+ *.exe a.out tags TAGS libtcc_test$(EXESUF)
350351 $(MAKE) -C tests $@
351352 ifneq ($(LIBTCC1),)
352353 $(MAKE) -C lib $@
@@ -359,6 +360,12 @@ config.mak: · 6 unmodified lines
359360 @echo "Please run ./configure."
360361 @exit 1
361362
363+tags:
364+ ctags $(top_srcdir)/*.[ch] $(top_srcdir)/include/*.h $(top_srcdir)/lib/*.[chS]
365+
366+TAGS:
367+ ctags -e $(top_srcdir)/*.[ch] $(top_srcdir)/include/*.h $(top_srcdir)/lib/*.[chS]
368+
362369 # create release tarball from *current* git branch (including tcc-doc.html
363370 # and converting two files to CRLF)
364371 TCC-VERSION := tcc-$(shell cat $(top_srcdir)/VERSION)
@@ -373,6 +380,6 @@ tar: tcc-doc.html · 8 unmodified lines
373380 rm -rf $(TCC-VERSION)
374381 git reset
375382
376−.PHONY: all clean tar distclean install uninstall FORCE
383+.PHONY: all clean tar tags TAGS distclean install uninstall FORCE
377384
378385 endif # ifeq ($(TOP),.)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t