• Emanuele Aina's avatar
    Makefile: Add missing dep on the generated DBus header file · a7aef43a
    Emanuele Aina authored
    The `helloworld-agent.c` source file includes `helloworld-tickboard.h`
    which in turn includes the generated
    `org.apertis.HelloWorldAgentApp.Agent.TickBoard.h` header file.
    However, `gdbus-gen` is only called to generate the TickBoard header when
    building the `libhelloworld-agent-generated.la` internal library, while
    `helloworld-agent.c` is part of `libhelloworld-agent-internal.la`.
    While this used to work by chance, newer Make chooses a different ordering
    leading to the error below:
          CC       helloworld-agent/helloworld-agent.o
        In file included from helloworld-agent/helloworld-agent.c:12:
        helloworld-agent/helloworld-tickboard.h:17:10: fatal error: org.apertis.HelloWorldAgentApp.Agent.TickBoard.h: No such file or directory
         #include "org.apertis.HelloWorldAgentApp.Agent.TickBoard.h"
        compilation terminated.
    To avoid the issue, add the generated source files to the automake
    `BUILT_SOURCES` variable so they get generated before the actual
    compilation begins.
    Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>