Skip to content
  • Alexandre Rostovtsev's avatar
    Fix implicit function declarations, bug 660531 · 75e6aac1
    Alexandre Rostovtsev authored and David King's avatar David King committed
    Fix numerous vinagre_utils_* and vinagre_dirs_* implicit function
    declarations by generating a header (vinagre/vinagre-vala.h) from the
    vala source and including it in half the .c files in the source tree.
    
    Add the vinagre-vala.h to dist_noinst_DATA to make sure it goes in the
    release tarballs, and to BUILT_SOURCES to ensure that it is generated
    before the C sources that #include it are compiled. Add
    -I$(top_srcdir)/vinagre to CPPFLAGS so that vinagre-vala.h is picked up
    in out-of-tree builds.
    
    Unfortunately, automake does not support per-target VALAFLAGS. We cannot
    simply add a "--header vinagre/vinagre-vala.h" option to AM_VALAFLAGS
    or VALAFLAGS because if we ever use a .vala file in another target (such
    as one of the vinagre plugins), vinagre-vala.h will get clobbered.
    
    The only way to prevent valac from running multiple times and safely
    support parallel make without adding a ticking time bomb that could
    clobber vinagre-vala.h is to manually write a stamp ...
    75e6aac1