Article View: gnu.gdb.bug
Article #2223"gdb" Makefile problem and work-around
From: Danel, Alexander
Date: Sat, 04 May 2002 05:26
Date: Sat, 04 May 2002 05:26
38 lines
2354 bytes
2354 bytes
Version: gdb-5.1.1
Configuration: any
Problem:
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'
Diagnosis:
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.
Solution:
As a work-around, I gave "make" a fake way to build the ".c"
files:
$(CONFIG_INITS):
@ls $(srcdir)/$@ ;
Note that I threw in the "ls" because it yields an exit status
that is meaningful.
Unfortunately, this work-around defeats the purpose of the
dependency line; since the ".c" files always need to be built,
the "make" program will be tricked into treating the "init:"
target as stale, even when it's not. And so on, in a cascade.
Alexander Danel
home e-mail: danel@speakeasy.net
Technical Details
Message-ID:
<FA1FD5F8085DD611882D00508B6F2D6C01273FBD@sntsex02.merc.chicago.cme.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sunqbc.risq.qc.ca!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdbShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,4e503463c5595106,start X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 2002-05-03 22:27:45 PST x-uunet-gateway: sjc3sosrv11.alter.net from bug-gdb to gnu.gdb.bug; Sat, 4 May 2002 05:27:43 GMT Message-ID: <FA1FD5F8085DD611882D00508B6F2D6C01273FBD@sntsex02.merc.chicago.cme.com> From: "Danel, Alexander" <ADanel@cme.com> Subject: "gdb" Makefile problem and work-around Date: Sat, 4 May 2002 00:26:09 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Approved: bug-gdb-request@mail.gnu.org Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sunqbc.risq.qc.ca!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb Sender: bug-gdb-request@mail.gnu.org Lines: 38