autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a macro to write an arbitrary file?


From: Allan Clark
Subject: Re: Is there a macro to write an arbitrary file?
Date: Wed, 14 Oct 2009 02:31:22 +0100

On Wed, Oct 14, 2009 at 02:13, Dr. David Kirkby <address@hidden>wrote:

> We have a makefile in a project, which works well. In the short term at
> least, we do not want to use autoconf to create a makefile, but instead use
> our own.
>
> However, it would be nice to have a configure script at the top, which at
> least supports --help and a few other things like that. But we do not want
> it to create a makefile in the usual way.
>
> Is it possible to create a configure.ac which sends it makefile to
> /dev/null, and instead creates one we want.
>
> Currently the first two lines of the makefile are:
>
> all:
>        cd spkg && ./install all 2>&1 | tee -a ../install.log
>

Hi;

First, there's a split you're missing: autoconf makes the configure.ac part
and the xx.in --> xx (ie Makefile.in --> Makefile), automake makes the
Makefile.am -> Makefile.in part.

You could simply use autoconf as a you're thinking:

AC_INIT(myproject, 0.1)
AC_CANONICAL_HOST
AC_PROG_INSTALL
AC_PROG_MAKE_SET
...etc...
...etc...

AC_OUTPUT(Makefile)

... and hand-build your Makefile.in:

all:
       cd spkg && ./install all 2>&1 | tee -a ../install.log


... and simply add tokens as you find portability problems.  You may decide
a few years down-the-road to go with Automake for the portability it offers,
but not today.  Maybe next month you'll need to replace the "tee" command
with a AC_PROG([tee]) in configure.in and a address@hidden@ in your Makefile.in.
 Who knows?

see also: two links of relatively unstructured replacement stuff:
http://www.gnu.org/software/hello/manual/autoconf/Setting-Output-Variables.html#Setting-Output-Variables
http://www.gnu.org/software/hello/manual/autoconf/Configuration-Files.html#Configuration-Files

Allan

-- 
address@hidden  "金鱼" http://linkedin.com/in/goldfish
please, no proprietary attachments (http://tinyurl.com/cbgq)
Sent from London, Eng, United Kingdom


reply via email to

[Prev in Thread] Current Thread [Next in Thread]