This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Require GNU Make Somehow?


One problem I've seen a lot is people configuring for separate
source and build directories, then forgetting to use GNU make.

The result is often a bug report that, at first glance (especially
to me, since I'm still just learning how these things work),
seems to be a "real problem", but is easily addressed by asking
the person "are you using GNU make".

To cut down on these kinds of problems, would it be possibly
to find a reliable, sure-fire way to detect and report this
situation ASAP to the user, using very clear language?

I'm thinking of something like this:

  # ../sourcedir/configure ...
  <configure does its work>
  # make ...
  Sorry: you are not using GNU make, FOOBAR make, or BLETCH make,
    and most other variants of make are known to have problems
    with configurations that have separate build and source
    directories.  Please retry with a version of make that is
    known to work.
  Exit 1
  #

Whether it's even desirable is, I would think, issue #1.  I'd
sure like it, just to cut down on the bug reports I get.

If "yes", #2 is probably how to do it in the way that is most
certain to get the "right" answer.

My guess is that doing it "right" means modifying autoconf,
maybe automake, and the variations gcc/egcs might use that
aren't "vanilla", to do the following:

  -  Detect that source and build directories are different

  -  If so, produce a makefile setup that "slides through" just
     fine when processed by a known-working make, but that
     produces a diagnostic like the above when processed by
     any other make

Ideally, it'd be easy for a "knowledgable" user to edit the
makefile setup to allow a not-known-working make to work
on that setup.

Also, just how to get the makefile setup to do its rejecting
regardless of the target(s) specified on the command line
is something I can't figure out offhand.  Maybe just handling
the "common" targets is fine; maybe just putting explicit
dependencies on a check-for-known-working-make target is fine;
I don't know.

Opinions on the desirability, at least?

        tq vm, (burley)


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