[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: name of current WML file



* nickel.de@gmx.de <nickel.de@gmx.de> [2002-04-15 19:58 +0200]:
> How do a write a macro that returns the name of the WML file being
> processed at the moment? (*not* the include file in which the macro is
> defined, and without directory and extension)

Either trust $(WML_SRC_FILENAME) or supply the true name to a variable
with wml -DREALNAME=$(basename ${thisfile} .wml) from your Makefile.

For example:

--------------------------------
	<define-tag basename whitespace=delete>
		<:
			$_='<get-var WML_SRC_FILENAME>';
			s/\.wml\E//; # chop off extension
			print; # return results :-)
		:>
	</define-tag>

	Hi, the basename of this file is <basename>
--------------------------------

-- 
Johannes Franken
 
Professional unix/network development
mailto:jfranken@jfranken.de
http://www.jfranken.de/
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com