autoconf
[Top][All Lists]
Advanced

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

Re: autoreconf --clean


From: Bob Proulx
Subject: Re: autoreconf --clean
Date: Wed, 14 Mar 2007 22:33:26 -0600
User-agent: Mutt/1.5.9i

David Byron wrote:
> I'm trying to find a way to remove all the files that autoreconf -fvi puts
> in my source directory.  This feels like something that someone else must
> have dealt with or at least thought about before.  It seems like a --clean
> option to autoreconf would do the trick.

The 'make maintainer-clean' automake generated target will almost do
what you want.  You could add the additional files to the variable
MAINTAINERCLEANFILES and then everything would be cleaned up.

> Is there another way to make files/directories like:
> 
> aclocal.m4
> autom4te.cache
> config.guess
> config.h.in
> config.sub
> configure
> depcomp
> install-sh
> missing
> and all the Makefile.in's generated from Makefile.am's
> 
> disappear?

Usually I would 'rm -rf' the source directory and they would all
disappear.

What use model are you envisioning?

> I'm also have in my head that it's OK to have the source directory on a
> read-only file system but then these files would have to go somewhere else.
> This isn't my goal, but perhaps they're related?

What you are asking about is essentially a "VPATH build".  You will
need GNU make to effectively use this feature.  In summary the process
is like this:

Given a source directory project-X.Y build in a different directory.
Frequently beside it but could actually be quite far away.

  chmod -R a-w project  # Just to show that it can be read-only

  mkdir debug-build
  cd debug-build
  ../project/configure CFLAGS=-g
  make

  cd ..
  mkdir opt-build
  cd opt-build
  ../project/configure CFLAGS=-O
  make

  cd ..
  rm -rf debug-build opt-build

Bob




reply via email to

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