2005-04-15 Paul Jakma <paul@dishone.st>
* memtypes.c: The new, unified location for memory type definitions.
The memtype enum and declarations for memory_lists are built from
this automatically and put into memtypes.h.
* memtypes.awk: New script to generate memtypes.h from memtypes.c
* memory.h: Finally, the enum can banished!
* memory.c: Finally, the seperate mtype memory_list definitions can
be banished!
(log_memstats) Increase width of fields
(show_memory_zebra_cmd) display zebra specific memory types.
Increase width of fields.
* Makefile.am: Add memtypes.{c,h}, add BUILT_SOURCES for memtypes.h
Add a rule to build memtypes.h using memtypes.awk.
Add memtypes.awk to EXTRA_DIST.
diff --git a/lib/Makefile.am b/lib/Makefile.am
index bc321b6..93442c8 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -12,7 +12,9 @@
sockunion.c prefix.c thread.c if.c memory.c buffer.c table.c hash.c \
filter.c routemap.c distribute.c stream.c str.c log.c plist.c \
zclient.c sockopt.c smux.c md5.c if_rmap.c keychain.c privs.c \
- sigevent.c pqueue.c jhash.c
+ sigevent.c pqueue.c jhash.c memtypes.c
+
+BUILT_SOURCES = memtypes.h
libzebra_la_DEPENDENCIES = @LIB_REGEX@
@@ -23,7 +25,9 @@
memory.h network.h prefix.h routemap.h distribute.h sockunion.h \
str.h stream.h table.h thread.h vector.h version.h vty.h zebra.h \
plist.h zclient.h sockopt.h smux.h md5-gnu.h if_rmap.h keychain.h \
- privs.h sigevent.h pqueue.h jhash.h zassert.h
+ privs.h sigevent.h pqueue.h jhash.h zassert.h memtypes.h
-EXTRA_DIST = regex.c regex-gnu.h
+EXTRA_DIST = regex.c regex-gnu.h memtypes.awk
+memtypes.h: memtypes.c memtypes.awk
+ ($(AWK) -f memtypes.awk memtypes.c > memtypes.h)