This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Ugly little hack for snapshot problem


First the problem:

  http://sources.redhat.com/gdb/bugs/708
  Can't build 5.3 branch (and probably trunk).

Here's a synopsis of the analysis:

  src-release walks the tree and configures all the subdirs and
  makes info files in them.

  src-release walks the tree and does 'distclean' to remove
  config.status and other files.

  The problem is that src/dejagnu/Makefile.am is coded in an unusual
  way.  src/dejagnu has subdirectories, and the subdirectories are
  configured normally, but Makefile.am does *not* list all the
  subdirectories!

  ... So 'configure' configures in dejagnu/example/calc, but
  'make distclean' never goes there, and the tarball gets some
  extra crap in it, specifically dejagnu/example/calc/config.status.
  Then the user tries to build from the tarball and gets an error that
  dejagnu/example/calc has already been configured and the build chokes.

In the past, I've had two ideas for fixing this.  One is to make a
simple local modification in sourceware dejagnu.  In fact, Andrew C did
this before, and it worked for two years, and then Nick C imported a new
dejagnu from Savannah and our local change got erased.

The second idea is to fix dejagnu upstream and then import a new
dejagnu.  I started on this but never finished it.

Now I've got a third idea.  It's simple:

    src-release walks the tree and configures all the subdirs ...
    src-release walks the tree and makes 'distclean ...'
  + src-release calls 'rm -f dejagnu/example/calc/config.status'

Advantages:

  It's very easily seen to be correct.
  It's very easily seen not to touch anything except src-release.
  It patches src-release, not dejagnu, so it doesn't get wiped
    by a dejagnu import.
  I can stick a comment in there so that if dejagnu evers gets fixed,
    and we import a new dejagnu, the kludge can go away soon after that.

Disadvantages:

  It's ugly.
  The top-level MAINTAINERS file does not say who owns 'src-release'.

Like the cliche says: "if it's stupid, and it works, it isn't stupid."

How about it?

Michael C


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]