[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Target specified by an empty variable
From: |
Oleksandr Gavenko |
Subject: |
Re: Target specified by an empty variable |
Date: |
Mon, 17 May 2010 19:37:54 +0300 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
On 2010.05.17 3:24, Glenn Morris wrote:
$(foo):
@echo foo
My question is, if foo is empty, ie:
foo =
which means that the $(foo) rule has no target (?), is the resulting
Makefile valid and portable? It seems to work OK with GNU make, but I
am not sure if I can rely on that.
From info make:
A "target" is usually the name of a file that is generated by a
program; examples of targets are executable or object files. A target
can also be the name of an action to carry out, such as `clean'.
So if strlen > 0 - it OK, otherwise GNU Make developer nothing guarantee.
If you run make with empty string target you get error:
$ LANG=C make ""
make: *** empty string invalid as file name. Stop.
It likely empty string target incorrect and you
must rewrote build scripts to avoid empty string in target.
--
С уважением, Александр Гавенко.