Dear Folks,

Does an extension exist that gives make more powerful regex support for
rules?
The least I'm looking for is multiple part pattern rules: for example

%1._m4_.%2 : %1.m4.%2
        m4 -P $(<) > $(@)

which would pre-process various files with m4.  For example foo.m4.mk
becomes
foo._m4_.mk.  Maybe it would be nice to restrict this by, for example,

%.(sh|mk|pl|rb|html): %1._m4_.%2 : %1.m4.%2
        m4 -P $(<) > $(@)

Another use for multiple part pattern rules would be to insert or change a
component
of the target/dependency path, for example,

%1/htdocs/%2.html : %1/source/%2.html
        m4 -P $(<) > $(@)

Obviously if htdocs/%.html : source/%.html was adequate I would not ask the
question.

More generally, why not allow full perl style regex in pattern rules and
$(...) functions?

/^(.*)\/htdocs\/(.*\.html)$/ : $1/source/$2
        m4 -P $(<) > $(@)

So as not to break things these could be enabled with a feature switch or
something like
the perl "use VERSION;" in the Makefile, probably $(use VERSION).

Is this ever going to be regular make?

Regards, Neil


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

Reply via email to