> What should I do to expand the % in the wildcard function?

Like Paul said, you can't.  But there is a way to do it.  Use $(eval ...) from 
version 3.80 and above.

> xsl/alldocs_%.xsl: genalldocs.php $(wildcard $(DOCS)/%/*.xml)

You would replace the above with this:

# define a template rule
define alldocs_rule
xsl/alldocs_$(1).xsl: genalldocs.php $(wildcard $(DOCS)/$(1)/*.xml)
        blah ablh blah

endef
# the space before the endef is sometimes important

# loop through all possible targets
ALLDOCS_RULES := \
        $(foreach file, \
                $(patsubst $(DOCS)/%,%, $(wildcard $(DOCS)/*)),
                $(call alldocs_rule,$(file)))

# insert the result into the makefile
$(eval $(ALLDOCS_RULES))

The created rules aren't implicit rules, they're regular rules so they'll 
behave that way.  This doesn't usually matter, but be aware of it.

Mike Gibson
[EMAIL PROTECTED]


_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to