[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking for built files
From: |
Keith Marshall |
Subject: |
Re: Checking for built files |
Date: |
Wed, 31 Oct 2007 12:59:35 +0000 |
On Tue, 2007-10-30 at 23:25 -0400, Andrej Prsa wrote:
> > I've long since deleted it, but IIRC, that's exactly what the
> > example was all about; it *didn't* wait for...
> >
> > > ... rather than the building stage ...
> >
> > ...and I don't believe it cared tuppence for...
> >
> > > *if* maintainer mode is enabled?
>
> Sorry, I seem to have a low-end parser implemented in my head, could
> you please rephrase that? ;) I don't think you are referring to the
> example Benoit posted, are you?
Sorry. You are right. I was confusing Benoit's example with the advice
Brooks offered. As penance, here's a simple, yet self contained example
of Brooks' strategy, which FWIW, is also the strategy I would adopt:--
<file name="configure.ac">
AC_INIT
AC_PATH_PROG([F2C], [f2c])
AC_SUBST([F2C_GENERATED], ["foo.c bar.c"])
missing=""
for f in ${F2C_GENERATED}
do
AC_MSG_CHECKING([for ${f}])
test -f ${srcdir}/${f} && test -r ${srcdir}/${f} && found=yes || found=no
AC_MSG_RESULT([${found}])
test "x${found}" = "xno" && missing="${missing} ${f}"
done
test -z "${F2C}" && test -n "${missing}" && AC_MSG_ERROR([
generated source files missing:${missing}
the f2c program is required to generate these source files,
but it does not appear to be installed.
])
test -z "${F2C}" && AC_MSG_WARN([
generated source files: ${F2C_GENERATED}
the f2c program is required to regenerate these source files,
but it does not appear to be installed; if you modify the FORTRAN
sources, from which these are generated, you will be unable to
build this application, without first installing f2c.
])
AC_OUTPUT
</file>
Regards,
Keith.