[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
doc suggestion: mention pattern rules with no commands earlier
From: |
Andrew Pimlott |
Subject: |
doc suggestion: mention pattern rules with no commands earlier |
Date: |
Thu, 23 Jul 2009 12:50:58 -0700 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
I got confused because I created a pattern rule with no commands, and
expected it to run. Finally, I found the section "Canceling Rules",
which implies that pattern rules with no commands are not run. It would
have helped me if this special case were mentioned earlier in the
documentation on pattern rules. Eg, something like this at the end of
"Introduction to Pattern Rules":
Pattern rules with no commands are treated specially. *Note
Canceling Rules::. If you want a pattern rule that doesn't do
anything, add an empty command.
By the way, I think that pattern rules with no commands (that actually
run) have a legitimate use. I had a rule like
foo: .stamp.foo
(with no commands), to make foo essentially an alias for .stamp-foo.
Worked fine. I wanted to generalize it into a pattern rule:
%: .stamp.%
No joy. But
%: .stamp.% ;
works--and make is even smart enough to see that there are no real
commands to run, so if .stamp.foo exists, "make foo" will report that
foo is up to date!
Andrew
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- doc suggestion: mention pattern rules with no commands earlier,
Andrew Pimlott <=