linux - gnu make foreach on empty list -


i have foreach in makefile seems execute when list empty - throws errors when shouldnt. how fix it?

flagerror := $(foreach package, $(pkglist), $(if $(wildcard $(package)/lib),,$(error can't find package:$(package)))) 

it works fine when have list of packages in pkglist. when empty (i have no dependencies) should pass through. instead, exits error

cant find package:


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -