diff options
author | Andrei Pavel <andrei@isc.org> | 2024-04-08 16:59:38 +0200 |
---|---|---|
committer | Andrei Pavel <andrei@isc.org> | 2024-04-17 13:53:39 +0200 |
commit | 0f71c39365ddcce631332f75ad606f45d346633b (patch) | |
tree | cb4ee702c83ba39fdd41ef7443567d33b6c6e5b5 | |
parent | [#3133] Updated code and tests (diff) | |
download | kea-0f71c39365ddcce631332f75ad606f45d346633b.tar.xz kea-0f71c39365ddcce631332f75ad606f45d346633b.zip |
[#1743] fix circular dependency in src/lib/log
Fixes the problem where to generate log_messages.(cc|h), you need
kea-msg-compiler, but to compile kea-msg-compiler you need
log_messages.(cc|h). This halted compilation even when building
from scratch.
Simply only regenerate log_messages.(cc|h) only if kea-msg-compiler
exists. It will not regenerate the files on first pass, but one can
explicitly call `make messages -C src/lib/log` afterwards to regenerate
the files.
-rw-r--r-- | src/lib/log/Makefile.am | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/log/Makefile.am b/src/lib/log/Makefile.am index 78a7ffa743..54e3589815 100644 --- a/src/lib/log/Makefile.am +++ b/src/lib/log/Makefile.am @@ -104,11 +104,19 @@ if GENERATE_MESSAGES messages: log_messages.cc log_messages.h logimpl_messages.cc logimpl_messages.h @echo Message files regenerated +# If bootstrapping, do not generate log messages because there is nothing to generate them with. +# A second make command or an explicit "make messages" command should do the job. log_messages.cc log_messages.h: log_messages.mes - $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/log/log_messages.mes + @if test -f $(top_builddir)/src/lib/log/compiler/kea-msg-compiler; then \ + $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/log/log_messages.mes; \ + fi +# If bootstrapping, do not generate log messages because there is nothing to generate them with. +# A second make command or an explicit "make messages" command should do the job. logimpl_messages.cc logimpl_messages.h: logimpl_messages.mes - $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/log/logimpl_messages.mes + @if test -f $(top_builddir)/src/lib/log/compiler/kea-msg-compiler; then \ + $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/log/logimpl_messages.mes; \ + fi else |