[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
$(error ...) in command.
From: |
Oleksandr Gavenko |
Subject: |
$(error ...) in command. |
Date: |
Mon, 01 Nov 2010 10:08:56 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 |
Consider such makefile:
first: second
@echo 1
@echo $(error xxx)
second:
@echo 2
When invoke
$ make first
2
makefile:2: *** xxx. Останов.
I think this behavior is nice because allow implement such pattern:
target: dep1 ... depn
recipe
ifeq '$(WEBTOOL)' 'wget'
wget ....
endif
ifeq '$(WEBTOOL)' 'curl'
$(error Not implemented) ## THIS IS NICE!
endif
I think this must be true:
1) target recipes expanded only when target executed and all before any
shell command
execution
2) if in variable/function expansion happen $(error ...) then make stops
I read manual and don't find explicit description about this.
--
С уважением, Александр Гавенко.
- $(error ...) in command.,
Oleksandr Gavenko <=