[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multi-stem pattern rule
From: |
Masahiro Yamada |
Subject: |
Re: Multi-stem pattern rule |
Date: |
Sun, 2 Jun 2024 04:04:12 +0900 |
On Fri, May 31, 2024 at 11:21 PM Dmitry Goncharov
<dgoncharov@users.sf.net> wrote:
>
> On Thu, May 30, 2024 at 7:45 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > The main purpose is to prepend '.' to the file name
> > in order to hide less-important files.
> >
> > For example, like this:
> >
> > a/b.x --> a/.b.timestamp
> > p/q/r.x --> p/q/.r.timestamp
>
> $ ls -F
> a/ makefile p/
> $ ls a/
> b.x
> $ ls p/q/
> r.x
> $ cat makefile
> all: a/.b.timestamp p/q/.r.timestamp
> .%.timestamp: %.x; $(info building $@ from $<)
> $ make
> building a/.b.timestamp from a/b.x
> building p/q/.r.timestamp from p/q/r.x
> make: Nothing to be done for 'all'.
>
>
> regards, Dmitry
Thanks, I was misunderstanding the pattern rule.
I just thought
.%.timestamp: %.x; $(info building $@ from $<)
would create .a/b.timestamp from a/b.x
So, % matches a part of the file name, excluding the
directory path, correct?
--
Best Regards
Masahiro Yamada
- Re: Multi-stem pattern rule,
Masahiro Yamada <=