bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stems in pattern rules suck! Why not use regexes


From: Kirat Singh
Subject: Stems in pattern rules suck! Why not use regexes
Date: Mon, 4 Dec 2000 13:19:50 -0500

So this has annoyed me forever. Why don't we simply use regexes in
pattern rules! I'd like to do something like:

$(PUBLIC_IDL_DIR)/.*/([^/]+): \1
        $(INSTALL_READONLY)

Also why not have a regsub instead of patsub? Is there some reason why 
regexes are being carefully kept out of make?

I typically run into this when I want to install something into a
directory hierarchy and have no way of generating the pattern rule
with a wildcard for the directory.

Another beef I have is why can't I generate rules using a foreach? So
I could also do the above with something like:

$(foreach idl_file,$(PUBLIC_IDL),$(PUBLIC_IDL_DIR)/$(idl_file) : 
$(PUBLIC_IDL_DIR)/$(dir $(idl_file))/% : % \
        $(INSTALL_READ_ONLY) \
)

This doesn't do what I expect at all.

-Kirat

PS This isn't really a bug, but I'm afraid I couldn't find a better
mailing list. Please flame if you feel the need ;-)



reply via email to

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