Ralf Wildenhues wrote:

> * Andreas Otto wrote on Fri, May 08, 2009 at 01:28:16PM CEST:
>>   I missing one target in automake to create a binary distribution
>
> You can just write one in your Makefile.am, as a plain 'make' rule.
> For reusability, you can also put it in a fragment file and include it
> in your Makefile.am.


I have a "best practice" question about this.  For awhile,
I've had generic targets that I like to include in all of
my projects, but rather than including the fragment in
each Makefile.am, I use the following hack^h^h^h^htechnique:
configure.ac invokes my initialization macro (which I
install on my dev box in /usr/local/share/aclocal rather
than putting in a subdir of each project), this creates
the make rule file snippets in a new subdir of the builddir
at configure time and AC_SUBST_FILES them so that the Makefile.am
can contain:

@MY_DEFAULT_RULES@

This mostly works, but there are a few cases where I need to
have the generated snippet file be just the rule, so I can do
things like:

check-local:
        @MY_LOCAL_RULES@


The question is: is that a reliable technique, or is it a
ridiculous hack that will someday come to haunt me?

-- 
William Pursell


Reply via email to