I wrote:
APKGDIR := c:/candidata/path
APKGCHECK := $(wildcard $(APKGDIR)/include/custx.h)
ifeq "$(APKGCHECK)" ""
APKGDIR := d:/other/candidate/path
APKGCHECK := $(wildcard $(APKGDIR)/include/custx.h)
endif
[...]
And, if anybody knows a better way to code the above search...
After rtfm and tinkering a bit, I came out with
define searchpath
$(patsubst %/$(1), %, $(firstword $(wildcard $(addsuffix /$(1), $(2)))))
endef
APKGDIR := $(call searchpath,include/custx.h,c:/candidate/path
d:/other/candidate/path)
Hmmm... this group is not very talkative during the weekends.
For the sake of discussion, I posted a patch to avoid improper use of tempnam
https://savannah.gnu.org/bugs/?func=detailitem&item_id=9748
The patch also contains a couple of `i' inserted into `streq' so as to allow
executing uppercase internal commands such as ECHO. Perhaps that may break unixy
shells that don't tolerate capital executions...