Mail Archives: djgpp/1997/09/27/17:02:09
From: | Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Make v3.76.1 bug?
|
Date: | Sat, 27 Sep 1997 15:52:14 +0100
|
Organization: | None
|
Distribution: | world
|
Message-ID: | <nkhK9HAe2RL0Ewn3@talula.demon.co.uk>
|
NNTP-Posting-Host: | talula.demon.co.uk
|
MIME-Version: | 1.0
|
Lines: | 41
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
The latest version of make seems to be doing some quite strange things
when conditional expressions are used to change the default target!
I realise this is more likely to be a gnu issue than a djgpp one, but
before I bother the FSF people I thought I would check if Eli or anyone
else who properly understands make has any suggestions to offer...
Given the makefile:
----------------
ifeq ($(VAL),1)
target1 :
@echo this is target #1
endif
ifeq ($(VAL),2)
target2 :
@echo this is target #2
endif
targetx :
@echo this is another target
----------------
I would expect to get a different message depending on whether I invoked
"make", "make VAL=1", or "make VAL=2". This works with make 3.75, but
with the latest version it seems to always take the "target1" as the
first, and therefore default target, but give an error when it actually
comes to build it because the rule has been removed by the conditionals!
Is this valid behaviour, or is it a bug?
NB. anyone trying to build Allegro 2.2 with make 3.76.1 will run into
this problem: just type "make djgpp" instead, and it will build
correctly...
--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.
- Raw text -