bug-make
[Top][All Lists]
Advanced

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

bug with + in defines


From: Matt Liberty
Subject: bug with + in defines
Date: Thu, 3 Jan 2002 14:41:55 -0800 (PST)

Hi,

There is a bug where a define having multiple lines, where only a
subset of the lines begin with +.  If this rule is run with "make -n"
all the rules will execute regardless of + or not.  Specifically,

Using:

% make --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.7

on this make file:

define DEF1
        +touch x
        touch y
endef

define DEF2
        touch q
        touch r
endef

all: test1 test2 test3 test4

test1:
        $(DEF1)

test2:
        $(DEF2)

test3:
        touch a
        touch b

test4:
        +touch e
        touch f


gives:

% ls
Makefile
sunws9[/tmp/test]% make -n
touch x
touch y
touch q
touch r
touch a
touch b
touch e
touch f
sunws9[/tmp/test]% ls
Makefile   e          x          y

Note that y should not have been generated as it doesn't begin with a
+.

I do not have a fix to submit at this time and am hoping another will
have time to look into it.


thanks,

-Matt Liberty



reply via email to

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