delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/06/15:56:01

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <C76DE572EEEBD41180A10002A507E4080C0110@anasazi.emware.com>
From: Scott Carter <scarter AT emware DOT com>
To: cygwin AT cygwin DOT com
Cc: "'Robert Bogomip'" <bob DOT bogo AT milohedge DOT com>
Subject: RE: make 3.79: core dump expanding target specific variables
Date: Tue, 6 Feb 2001 13:51:14 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

I don't have a explanation/solution for the core dump, but here's a
explanation of why you get [ 2] rather than [2] 

http://sources.redhat.com/ml/cygwin/2000-07/msg00816.html
(summary: += inserts a space.)

Because of this, the += will not give the result you appear to want. 
None of the following alternatives worked for me
t : m = ${m}2
t : m := ${m}2
m := ${m}2

But this does
---------------------------
/cygdrive/d/temp % cat makefile
t: n = ${m}2

t:
        @echo "[${n}]"

/cygdrive/d/temp % make t
[2]
/cygdrive/d/temp % make m=hello t
[hello2]
/cygdrive/d/temp %
---------------------------

Scott Carter
Software Engineer



-----Original Message-----
From: Robert Bogomip [mailto:bob DOT bogo AT milohedge DOT com]
Sent: Tuesday, February 06, 2001 07:55 AM
To: cygwin AT cygwin DOT com
Subject: make 3.79: core dump expanding target specific variables


Consider this makefile:

  t: m+=2

  t:
	@echo "[${m}]"

Then the following sort of works:

  $ make t
  [ 2]
  $

(Interestingly, make 3.77 (which I have kept a copy of) produces a
different result:

  $ make377 t
  [2]
  $

Hmmm.)

BUT the folowing crashes:

  $ make m=hello t
  assertion "current_variable_set_list->next != 0" failed: file
"/cygnus/netrel/src/make-3.79.1-2/expand.c", line 489

        0 [sig] make 1580 stackdump: Dumping stack trace to
make.exe.stackdump
  Aborted (core dumped)
  $

All is OK with m:=hello on the command line (note the colon), and also
running with make377. None of make-3.79-3, make-3.79.1-1, or make 3.79.1-2
work.
-- 
Robert Bogomip /// mailto:bob DOT bogo AT milohedge DOT com
Milo Hedge Ltd, OCFI, Mill Street, Oxford, OX2 0JX /// tel:+44 1865 799400


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019