Browse Source

[trac745] Build nsasdef.{cc,h} from nsasdef.msg

The logging source files are now built at run-time instead of being
part of the repository.
Stephen Morris 14 years ago
parent
commit
1ce2874170
3 changed files with 4 additions and 44 deletions
  1. 4 0
      src/lib/nsas/Makefile.am
  2. 0 27
      src/lib/nsas/nsasdef.cc
  3. 0 17
      src/lib/nsas/nsasdef.h

+ 4 - 0
src/lib/nsas/Makefile.am

@@ -21,6 +21,10 @@ if USE_CLANGPP
 AM_CXXFLAGS += -Wno-unused-parameter
 endif
 
+# Build the logging source files from the message definition
+nsasdef.h nsasdef.cc: nsasdef.msg
+	$(top_builddir)/src/lib/log/compiler/message nsasdef.msg
+
 lib_LTLIBRARIES = libnsas.la
 libnsas_la_SOURCES  = address_entry.h address_entry.cc
 libnsas_la_SOURCES += asiolink.h

+ 0 - 27
src/lib/nsas/nsasdef.cc

@@ -1,27 +0,0 @@
-// File created from nsasdef.msg on Thu Apr 28 09:42:02 2011
-
-#include <cstddef>
-#include <log/message_types.h>
-#include <log/message_initializer.h>
-
-namespace isc {
-namespace nsas {
-
-extern const isc::log::MessageID NSAS_LOOKUPCANCEL = "LOOKUPCANCEL";
-extern const isc::log::MessageID NSAS_LOOKUPZONE = "LOOKUPZONE";
-
-} // namespace nsas
-} // namespace isc
-
-namespace {
-
-const char* values[] = {
-    "LOOKUPCANCEL", "lookup for zone %s has been cancelled",
-    "LOOKUPZONE", "searching NSAS for nameservers for zone %s",
-    NULL
-};
-
-const isc::log::MessageInitializer initializer(values);
-
-} // Anonymous namespace
-

+ 0 - 17
src/lib/nsas/nsasdef.h

@@ -1,17 +0,0 @@
-// File created from nsasdef.msg on Thu Apr 28 09:42:02 2011
-
-#ifndef __NSASDEF_H
-#define __NSASDEF_H
-
-#include <log/message_types.h>
-
-namespace isc {
-namespace nsas {
-
-extern const isc::log::MessageID NSAS_LOOKUPCANCEL;
-extern const isc::log::MessageID NSAS_LOOKUPZONE;
-
-} // namespace nsas
-} // namespace isc
-
-#endif // __NSASDEF_H