Dear List, I would like to share these m4 macros for vala/valadoc with you. They helped me to keep the 'Makefile.am's neat and clean. The approach is copied from intltool, by substituting rules with @XXXX@ substitutions in Makefile.am. vala.m4 provides helpers for invoking valac. This file is modified from Mathias's original vala.m4. valadoc.m4 provides helpers for invoking valadoc and adds a --enable-valadoc parameter to the configure script. Drop them into a toplevel sub-directory in your project (namely ./autotools) Add three lines to configure.ac AC_CONFIG_MACRO_DIR([autotools]) AC_CONFIG_AUX_DIR([autotools]) AC_SUBST(ACLOCAL_AMFLAGS, "-I autotools") # also modify aclocal in autogen.sh if applicable Then VALA_PROG_VALAC(0.6.0) VALA_PROG_VALADOC More information are in the m4 files. An example for using both together is given in valadoc.m4. The limitation is that only one 'ultimate' target(ie, one .la file) per source code directory can be built with the rules. Regards, Yu
Attachment:
vala.m4
Description: application/m4
Attachment:
valadoc.m4
Description: application/m4