Hello, I'm wondering what the canonical way of providing my own compile/link target are for sources with a particular suffix.
If I have a language foo (interpreted) and a byte compiler fooc how do I best achieve what would be done equivalently in a C based Makefile.am. I'd like to take advantage of the existing automake primaries because many of the other targets will `just work' for me in the way I expect. In particular install/dist. Anyway... Typical Makefile.am snippet (similar to that for a C program). # start bin_PROGRAMS = someprog someprog_SOURCES = someprog.fs # end Where for the above I would want a target generated (basically). someprog$(EXEEXT): $(someprog_SOURCES) fooc -o $@ $(someprog_SOURCES) I have tried the following: Option 1: Just define a target for someprog$(EXEEXT) (i.e. override automake generated target) While this works it generates a warning. /usr/share/automake-1.14/am/program.am: ... overrides Automake target 'someprog$(EXEEXT)' defined here src/Makefile.am:1: while processing program 'someprog' Which means I cannot AM_INIT_AUTOMAKE([-Werror]) which I would like. Option 2: Abuse assignment to _LINK so the generated target has the desired outcome. # Also requires listing someprog_SOURCES with $(srcdir) someprog_SOURCES = $(srcdir)/someprog.fs someprog_LINK = fooc -o $@ $(someprog_SOURCES) This also works but obviously the generated target is a bit unsightly and full of empty variables that don't belong. someprog$(EXEEXT): $(someprog_OBJECTS) $(someprog_DEPENDENCIES) $(EXTRA_someprog_DEPENDENCIES) @rm -f someprog$(EXEEXT) $(AM_V_GEN)$(someprog_LINK) $(someprog_OBJECTS) $(someprog_LDADD) $(LIBS) Obviously it's also a concern that this is likely to break in some future version of automake. So what is the canonical way to do this cleanly & correctly? Or are we looking at having to extend automake to get this? Kind regards,