help-make
[Top][All Lists]
Advanced

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

Re: GNU Make feature request, pattern matching


From: Noah Slater
Subject: Re: GNU Make feature request, pattern matching
Date: Wed, 22 Oct 2008 12:26:57 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Sep 30, 2008 at 07:42:42PM +0100, Noah Slater wrote:
> Summary: I would like to request a small feature be added to GNU Make
...
> When trying to create a set of rules for the distributed makefiles I initially
> had the software changing into the output directory to doing something 
> similar to this:
>
>   %.html: $(src)/%.txt
>       $(info example making html from txt)
>
> The idea being that this would match the following:
>
>   dir/dir/index.html: $(src)/dir/dir/index.txt
>
> I was confused when this didn't work, and from the GNU Make manual we have 
> this:
>
>   "When the target pattern does not contain a slash (and it usually does not),
>   directory names in the file names are removed from the file name before it 
> is
>   compared with the target prefix and suffix."
>
> So in actual fact, this rule was trying to match:
>
>   dir/dir/index.html: dir/dir/$(src)/index.txt
>
...
> Would you consider putting in a command option that would disable this special
> case implicit match behaviour?
>
> I had a poke through implicit.c and found what looks to be the right bit of
> code, and the change looks like it should be simple enough, but I'm no C
> developer so I won't embarrass my self with a patch.

I'm picking this back up because it's been a while since the thread died and I
am assuming no one on the list has any elegant workarounds that would fit with
the application I am developing.

Since that time, I have realised that a command line option would be a
mistake. Instead, a special target that switched this proposed behaviour on
would be ideal. Something like:

  .NO_IMPLICIT_STRIP

Is there a possibility we could get this added to GNU Make?

Thanks,

-- 
Noah Slater, http://bytesexual.org/nslater




reply via email to

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