7e8b17bf4b3fc6176dc79081ff61dcda05139d75
[supertux.git] / mk / jam / help.jam
1 #============================================================================
2 # Rules for displaying help messages about targets
3 #============================================================================
4
5 ##  Help target : description
6 ##    Adds a description to a target which will be shown to the user when
7 ##    "jam help" is invoked.
8 rule Help
9 {
10   $(<)_help = $(>) ;
11   local target = $(<:G=help) ;
12   Depends help : $(target) ;
13   NotFile $(>) ;
14   PrintHelp $(target) : $(>) ;
15   Always $(target) ;
16 }
17
18 #----------------------------------------------------------------------------
19                                                                                 
20 NotFile help ;
21 Always help ;
22
23 actions quietly PrintHelp
24 {
25   # target width:13, description width:51
26   echo "jam ->$(<)              <- =>$(>)                                                   <=" | \
27     sed 's/->\(..............\).*<-/\1/;s/=>\(...................................................\).*<=/\1/'
28 }