Re: Aborting automake?

2003-11-07 Thread Robert Collins
On Sat, 2003-11-08 at 11:22, Harlan Stenn wrote:
> I have a situation where I want every Makefile.am to 'include' one of
> several files.
> 
> If none of these files are 'include'd I want the automake run to abort.
> 
> I know how to cause the abort at runtime, but I'd rather catch this problem
> while automake is running.

If you want the automake include facility, then you'd need to extend
automake to allow some sort of policy check at the end of processing
each Makefile.am. thinking out loud, something like
check_script=${top_srcdir)/link_Makfile.am.sh in automake_options...
then have automake call out to that script, with a failure meaning abort
the automake run.

Rob

-- 
GPG key available at: .





Re: Aborting automake?

2003-11-07 Thread Alexandre Duret-Lutz
>>> "Harlan" == Harlan Stenn <[EMAIL PROTECTED]> writes:

 Harlan> I have a situation where I want every Makefile.am to
 Harlan> 'include' one of several files.

 Harlan> If none of these files are 'include'd I want the
 Harlan> automake run to abort.

 Harlan> I know how to cause the abort at runtime, but I'd
 Harlan> rather catch this problem while automake is running.

 Harlan> Is there a way to do this?

I can't think of any comfortable way.

Here is an awkward idea, just for your amusement.

If you
  AC_SUBST([AUTOMAKE_OPTIONS])
from configure.ac, then
  AUTOMAKE_OPTIONS = @AUTOMAKE_OPTIONS@
will be the default value of AUTOMAKE_OPTIONS in all Makefiles.  

Automake will then complain that @AUTOMAKE_OPTIONS@ is not a
supported option, and abort...  unless you override
AUTOMAKE_OPTIONS in each Makefile.  You could arrange to define
AUTOMAKE_OPTIONS in all your include fragments.

One annoying problem is that the diagnostic you get when a
Makefile do not include any makefile fragment will refer to the
AC_SUBST definition in configure.ac, not to the current
Makefile.
-- 
Alexandre Duret-Lutz