MegaGlest/mk/linux/mk/jam/help.jam

29 lines
976 B
Plaintext

#============================================================================
# Rules for displaying help messages about targets
#============================================================================
## Help target : description
## Adds a description to a target which will be shown to the user when
## "jam help" is invoked.
rule Help
{
$(<)_help = $(>) ;
local target = $(<:G=help) ;
Depends help : $(target) ;
NotFile $(>) ;
PrintHelp $(target) : $(>) ;
Always $(target) ;
}
#----------------------------------------------------------------------------
NotFile help ;
Always help ;
actions quietly PrintHelp
{
# target width:13, description width:51
echo "jam ->$(<) <- =>$(>) <=" | \
sed 's/->\(..............\).*<-/\1/;s/=>\(...................................................\).*<=/\1/'
}