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.

--
С уважением, Александр Гавенко.

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to