Commit 313464ee authored by Stephen Morris's avatar Stephen Morris

[trac745] Update Makefile as a result of problems encountered in make distcheck

Also renamed the message file extension to ".mes" to conform to other
messages files and updated the associated documentation as well.
parent 4fff42d6
......@@ -55,7 +55,7 @@ The steps in using the system are:
mnemonic for the message, typically 6-12 characters long - and a message.
The file is described in more detail below.
Ideally the file should have a file type of ".msg".
Ideally the file should have a file type of ".mes".
2. Run it through the message compiler to produce the .h and .cc files. It
is intended that this step be included in the build process. However,
......
......@@ -9,25 +9,35 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/lib/nsas -I$(top_builddir)/src/lib/nsas
AM_CPPFLAGS += $(SQLITE_CFLAGS)
AM_CXXFLAGS = $(B10_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# Some versions of GCC warn about some versions of Boost regarding missing
# initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
if USE_CLANGPP
# clang++ complains about unused function parameters in some boost header
# files.
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
# Define rule to build logging source files from message file
nsasdef.h nsasdef.cc: nsasdef.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/nsas/nsasdef.mes
# What is being built.
lib_LTLIBRARIES = libnsas.la
libnsas_la_SOURCES = nsasdef.h nsasdef.cc
libnsas_la_SOURCES += address_entry.h address_entry.cc
# Tell Automake that the nsasdef.{cc,h} source files are created in the build
# process, so it must create these before doing anything else. Although they
# are a dependency of the library (so will be created from the message file
# anyway), there is no guarantee as to exactly _when_ in the build they will be
# created. As the .h file is included in other sources file (so must be
# present when they are compiled), the safest option is to create it first.
BUILT_SOURCES = nsasdef.h nsasdef.cc
# Library sources. The generated files will not be in the distribution.
libnsas_la_SOURCES = address_entry.h address_entry.cc
libnsas_la_SOURCES += asiolink.h
libnsas_la_SOURCES += hash.cc hash.h
libnsas_la_SOURCES += hash_deleter.h
......@@ -44,6 +54,10 @@ libnsas_la_SOURCES += fetchable.h
libnsas_la_SOURCES += address_request_callback.h
libnsas_la_SOURCES += glue_hints.h glue_hints.cc
EXTRA_DIST = nsasdef.msg
nodist_libnsas_la_SOURCES = nsasdef.h nsasdef.cc
# The message file should be in the distribution.
EXTRA_DIST = nsasdef.mes
CLEANFILES = *.gcno *.gcda
# Make sure that the generated files are got rid of in a clean operation
CLEANFILES = *.gcno *.gcda nsasdef.h nsasdef.cc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment