Subject: bug#953: closed (Re: pre-crt0.o error for build in separate directory)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 20 May 2011 18:39:02 +0000

Your bug report

#953: pre-crt0.o error for build in separate directory

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
953: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=953
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: pre-crt0.o error for build in separate directory
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Fri, 20 May 2011 14:37:57 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

I notice that the current version of configure gives a different
message:

  source directory already configured; run \"make distclean\" there first

So I guess this was an autoconf issue and not an Emacs one.

>From [email-masked] Tue Sep  9 21:29:03 2008
From: Glenn Morris <[email-masked]>
To: [email-masked]
Subject: pre-crt0.o error for build in separate directory
Date: Wed, 10 Sep 2008 00:27:09 -0400

Package: emacs
Severity: minor
Version: 23.0.60

I don't normally build in a separate directory, but I was trying it as
an experiment.

I had CVS checkout in:

/somedir/trunk

This contained the result of a normal build, ie had not been cleaned.

I then did:

cd /somedir/build
../trunk/configure

which warned me:

   WARNING: The directory tree `/somedir/trunk' is being used as a build
   directory right now; it has been configured in its own right. To
   configure in another directory as well, you MUST use GNU make. If
   you do not have GNU make, then you must now do `make distclean' in
   /somedir/trunk, and then run ../trunk/configure again."

Since I use GNU make (3.81 on RHEL 5.2), I carried on without running
distclean.

The build failed because /somedir/build/src/pre-crt0.o was not generated.
Running `make prec-crt0.o' in that directory, I was told
that "`/somedir/trunk/src/pre-crt0.o' is up to date."

I had to delete the pre-crt0.o in trunk/src in order to get a version
to compile in build/src.

Thus, the initial message output by configure is incorrect.

I'm not sure where the bug is here: in configure's message, or GNU
make, or Emacs.

(The same thing was happening for character.o and chartab.o until I
fixed their broken dependencies on $(config_h).)