[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: autoreconf --clean
From: |
David Byron |
Subject: |
RE: autoreconf --clean |
Date: |
Wed, 14 Mar 2007 21:41:30 -0700 |
On Wednesday, March 14, 2007 @ 9:33p, Bob Proulx wrote:
> 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.
Right, but then I need a Makefile (which I might not have if I've run
autoreconf -fvi, but haven't configured anywhere), and I need to add some
special logic to the Makefile which I bet duplicates info that autoreconf
already knows, and gets complicated if I add things like
AC_CONFIG_AUX_DIR(build-aux)
to my configure.ac
> > 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?
It's helpful when preparing to check things in to revision control to remove
_all_ generated files. rm -rf does this, but is a little more brutal than I
have in mind.
> > 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.
I assumed this, yes. Sorry I didn't make this clear.
> 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
This makes sense but what if we assume that we're starting with configure.ac
and Makefile.am instead of a configure script and Makefile.in? At this
point the source directory can no longer be read only, correct?
-DB