From: Ian Jackson Date: Wed, 19 Jan 2011 23:20:59 +0000 (+0000) Subject: Makefiles: generate TAGS X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=422d3ea99d5253735152284afe785789d5da205b;p=trains.git Makefiles: generate TAGS --- diff --git a/.gitignore b/.gitignore index 62d3f8b..2a6b84a 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ divider-table.txt parts.ps *.zip.d *.o +TAGS diff --git a/cprogs.make b/cprogs.make index ab853ba..22ec570 100644 --- a/cprogs.make +++ b/cprogs.make @@ -18,3 +18,8 @@ FLEXCFLAGS= -Wno-unused -Wno-missing-declarations -Wno-missing-prototypes %.c: %.y $(BISON) -o $@ $< + +ETAGS_SRCS += $(wildcard *.[ch]) + +TAGS: $(ETAGS_SRCS) + etags $^ diff --git a/hostside/Makefile b/hostside/Makefile index b5bb720..5f3fa01 100644 --- a/hostside/Makefile +++ b/hostside/Makefile @@ -18,14 +18,16 @@ INPUT_H= /usr/include/linux/input.h LIBOOP_OBJS= __oop-read-copy.o -loop LAYOUT_DATA= ../layout/ours.layout-data +ETAGS_SRCS += $(LAYOUT_DATA).c ../layout/layout-data.h + include ../common.make include ../cprogs.make default: all recurse: all for-pic: -all: $(TARGETS) -client: $(CLIENT_TARGETS) +all: $(TARGETS) TAGS +client: $(CLIENT_TARGETS) TAGS #---------- executables ---------- @@ -79,7 +81,7 @@ auproto-pic.c auproto-pic.h: auproto-%: \ record-y.h: record-y.c record-l.h: record-l.c -layoutinfo.h: ../layout/ours.layout-data.c Makefile +layoutinfo.h: $(LAYOUT_DATA).c Makefile sed -e '/^#include/,$$d' $< $(ocmp) retransmit-table.h errorcodes.h stastate.h: %: %.gen