🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Danel, Alexander Sat, 04 May 2002 05:26
"gdb" Makefile problem and work-around
#2223
Author: Danel, Alexander
Date: Sat, 04 May 2002 05:26
38 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads