Hi All,

$cat Makefile
mkdir-%:
    @mkdir -p $*
$make mkdir-dir1/dir2
Make: *** No rule to make target `mkdir-dir1/dir2'.  Stop.

It seems % does not match / in pattern rules. But the GNU Make doc says:
|-------------------------------------------------------------------------------------------|
|  10.5 Defining and Redefining Pattern Rules
                     |
|
                     |
|  You define an implicit rule by writing a pattern rule. A pattern
rule looks like         |
|  an ordinary rule, except that its target contains the character `%'
                     |
|  (exactly one of them). The target is considered a pattern for
matching file names;       |
|  the `%' can match any nonempty substring, while other characters
match only themselves.  |
|  The prerequisites likewise use `%' to show how their names relate
to the target name.    |
|-------------------------------------------------------------------------------------------|
So, what's wrong?

Best Regards,
PRC
Apr 13, 2008


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to