3a387392f1e92669e1904f9c06407013e6d97134
[supertux.git] / data / Jamfile
1 SubDir TOP data ;
2
3 rule recursive-glob
4 {
5     local result ;
6     result += $(<) ;
7     local fullname ;
8     local contents = [ GLOB [ ConcatDirs $(SUBDIR) $(<) ] : $(>) ] ;
9     for fullname in $(contents)
10     {
11         local split-path = [ MATCH ^$(SUBDIR)/(.*)$ : $(fullname) ] ;
12         local name = $(split-path[1]) ;
13         if ! ( $(name:D=) in . .. .svn ) { 
14                 result += [ recursive-glob $(name) : $(>) ] ; 
15         }
16     }
17     return $(result) ;
18 }
19
20 IMAGEPATHS = [ recursive-glob images : * ] ;
21
22 for p in $(IMAGEPATHS) {
23     InstallData 
24         [ Wildcard $(p) : *.png *.jpg *.xpm *.strf *.sprite *.ico *.stgt *.stwt ] 
25       : $(p)
26     ;
27 }
28
29 LEVELPATHS = 
30   levels/bonus1
31   levels/bonus2
32   levels/contribs
33   levels/misc
34   levels/test
35   levels/world1
36   levels/world2
37 ;
38
39 for p in $(LEVELPATHS) {
40   InstallData [ Wildcard $(p) : info *.nut *.stl *.stwm *.txt *.po *.pot README ] : $(p) ;
41
42   local translatable_lisp = [ Wildcard $(p) : info *.stl *.stwm *.txt ] ;
43   local translatable_squirrel = [ Wildcard $(p) : *.nut ] ;
44   SEARCH on $(translatable_lisp) = $(SEARCH_SOURCE) ;
45   SEARCH on $(translatable_squirrel) = $(SEARCH_SOURCE) ;
46   MakePot $(SUBDIR)/$(p)/messages.pot : $(translatable_lisp) ;
47   XGETTEXT_FLAGS on $(SUBDIR)/$(p)/messages.pot += --keyword='_:1' --language=Lisp --sort-by-file ;
48 }
49 InstallData [ Wildcard *.txt *.po ] ;
50 InstallData [ Wildcard music : *.ogg ] : music ;
51 InstallData [ Wildcard scripts : *.nut ] : scripts ;
52 InstallData [ Wildcard speech : *.ogg ] : speech ;
53 InstallData [ Wildcard sounds : *.wav *.ogg ] : sounds ;
54 InstallData [ Wildcard locale : *.po *.pot ] : locale ;