bug-make
[Top][All Lists]
Advanced

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

Bug with comment parsing and variable expansion


From: Rafaël Carré
Subject: Bug with comment parsing and variable expansion
Date: Tue, 9 Nov 2010 15:47:36 +0100

Hello,

I believe I've found a bug in make 3.81, or at least some confusing
behaviour.

Here is a comparison of GNU make and netbsd 'pmake'

A-$(X) isn't expanded to "A-1" because of the comment on the line where
X is set, although X is set to "1"

% cat Makefile 
X = 1 #comment
Y = 1
A-$(X) = a
B-$(Y) = b

all:
        @echo $(X) $(A-1)
        @echo $(Y) $(B-1)
% make
1
1 b
% make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu
% pmake 
1 a
1 b
% dpkg -s pmake|grep ^Version:
Version: 1.111-2

-- 
✍ Rafaël Carré ☺

Attachment: signature.asc
Description: PGP signature


reply via email to

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