This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/534: Separate source + build directory with SunOS make
- From: mec at shout dot net
- To: gdb-gnats at sources dot redhat dot com
- Cc: ADanel at cme dot com
- Date: 6 May 2002 20:18:44 -0000
- Subject: gdb/534: Separate source + build directory with SunOS make
- Reply-to: mec at shout dot net
>Number: 534
>Category: gdb
>Synopsis: Separate source + build directory with SunOS make
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 06 13:28:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: mec@shout.net
>Release: 5.1.1
>Organization:
>Environment:
native SunOS 5.6
>Description:
A user reports that gdb 5.1.1 does not build with separate source and build directories on SunOS 5.6.
The output of uname -a is:
SunOS apdv1 5.6 Generic_105181-30 sun4u sparc SUNW,Ultra-Enterprise
The error is:
make: Fatal error: Don't know how to make target `mi/mi-cmds.c'
Current working directory ...blah/blah..
*** Error code 1
make: Fatal error: Command failed for target `all-gdb'
The user reports:
This "Makefile" fails when the compilation is occurring in a build
directory that is anything other than the source directory.
The problem manifests when the target "init:" is the next thing
to be built. It's dependency list include $(CONFIG_INITS); these
are ".c" source files, but these particular source files have a
special twist that is the source of the problem -- they are in a
subdirectory, namely, "mi/". The "make" wants to check the
time-stamp of these files, but can't find them. Subsequently,
the "make" is compelled to try to create the seemingly missing
files, but of course that is not going to work.
The user is using SunOS make, not Gnu Make.
It looks like SunOS make does not handle VPATH the way that gdb needs.
>How-To-Repeat:
Start with a SunOS 5.6 machine.
Configure gdb in a separate build directory from the source directory.
Build gdb.
>Fix:
Either:
(1) Document that gdb requires gnu make when build dir != source dir. This is a reasonable thing to require, but we have to say so explicitly.
(2) Change Makefile.in and automake to work with native SunOS make.
I like (1) better than (2).
>Release-Note:
>Audit-Trail:
>Unformatted: