help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnumake 3.79.1 bug?


From: Paul D. Smith
Subject: Re: gnumake 3.79.1 bug?
Date: 05 Apr 2005 08:13:54 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

%% Randy Yates <randy.yates@sonyericsson.com> writes:

  ry> It appears that there is a bug in gnumake that arises when a
  ry> variable is redefined. For example, if I define "EXE = .a" in my
  ry> main makefile, then specify a build rule for a target
  ry> "myproject$(EXE)", then include a second makefile that redefines
  ry> "EXE = .out" and makes some other build rules for other targets,
  ry> then the first build rule seems to get confused. If I put "echo
  ry> $(EXE)" I see the right value (".a"), but the target acts as if
  ry> the second value (".exe") is present and the file does not
  ry> recognize the command line target "myproject.a".

  ry> Is this a bug? Is this a known bug?

If it behaves as you say (as best I can determine: examples are more
useful than textual descriptions) then it would be a bug.  But, I cannot
reproduce this behavior myself.  For example:

  EXE = .x
  foo$(EXE):
        @echo EXE = $(EXE)
        @echo @ = $@
  EXE = .y
  foo$(EXE):
        @echo EXE = $(EXE)
        @echo @ = $@

Gives the expected result:

  $ make foo.x
  EXE = .y
  @ = foo.x

  $ make foo.y
  EXE = .y
  @ = foo.y

Maybe you can provide an example or more detail about your situation.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@gnu.org>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


reply via email to

[Prev in Thread] Current Thread [Next in Thread]