[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
_PROGRAMS for non-C/C++/F77
From: |
John Anon |
Subject: |
_PROGRAMS for non-C/C++/F77 |
Date: |
Sun, 1 Feb 2015 14:58:12 -0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- _PROGRAMS for non-C/C++/F77,
John Anon <=