[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Insensitive wildcard matching
From: |
Alessandro Vesely |
Subject: |
Re: Insensitive wildcard matching |
Date: |
Sun, 25 Jul 2004 15:07:37 +0200 |
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...
- Insensitive wildcard matching, Alessandro Vesely, 2004/07/24
- Re: Insensitive wildcard matching,
Alessandro Vesely <=
- Re: Insensitive wildcard matching, Earnie Boyd, 2004/07/25
- Re: Insensitive wildcard matching, Alessandro Vesely, 2004/07/26
- Re: Insensitive wildcard matching, Eli Zaretskii, 2004/07/26
- Re: Insensitive wildcard matching, Alessandro Vesely, 2004/07/27
- Re: Insensitive wildcard matching, Eli Zaretskii, 2004/07/27
- Re: Insensitive wildcard matching, Alessandro Vesely, 2004/07/28
- Re: Insensitive wildcard matching, Earnie Boyd, 2004/07/28
- Re: Insensitive wildcard matching, Eli Zaretskii, 2004/07/28