make-w32
[Top][All Lists]
Advanced

[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...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]