Browse Source

Add tags generation/cleanup to Makefile

Aaron Lindsay 5 years ago
parent
commit
5f78e1f55d
1 changed files with 7 additions and 1 deletions
  1. 7 1
      Makefile

+ 7 - 1
Makefile

@@ -36,7 +36,7 @@ ifneq (,$(SUBDIRS))
36 36
 	include $(patsubst %,%/kernel.mk,$(SUBDIRS))
37 37
 endif
38 38
 
39
-.PHONY: all clean boot boot-gdb
39
+.PHONY: all tags clean boot boot-gdb
40 40
 
41 41
 all: aedrix-kernel.img aedrix-kernel.elf
42 42
 
@@ -80,6 +80,10 @@ config.h: config
80 80
 	@sed -i 's/^\s*\(CONFIG_[A-Z0-9_]\+\)\s*=\s*[yY]/#define \1/g' config.h
81 81
 	@sed -i 's/^\s*\(CONFIG_[A-Z0-9_]\+\)\s*=\s*\([0-9]\+\)/#define \1 \2/g' config.h
82 82
 
83
+tags:
84
+	@echo ' CTAGS    tags'
85
+	$(V)ctags -R $(SUBDIRS)
86
+
83 87
 clean:
84 88
 	@echo '  CLEAN   config.h'
85 89
 	$(V)rm -f config.h
@@ -93,6 +97,8 @@ clean:
93 97
 	$(V)rm -f aedrix-kernel.objdump
94 98
 	@echo '  CLEAN   aedrix-kernel.img'
95 99
 	$(V)rm -f aedrix-kernel.img
100
+	@echo '  CLEAN   tags'
101
+	$(V)rm -f tags
96 102
 
97 103
 boot-elf: aedrix-kernel.elf
98 104
 	$(V)$(ARCH_QEMU_CMD) -kernel aedrix-kernel.elf -serial stdio