now copy all patterned files, working

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8443 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2004-07-20 17:25:59 +00:00
parent 66950a7925
commit de9dab516d
+54 -32
View File
@@ -1,38 +1,60 @@
SubDir OBOS_TOP src apps bin vim runtime ; SubDir OBOS_TOP src apps bin vim runtime ;
local VIMDIR = [ FDirName $(OBOS_ETC_DIR) vim vim63 ] ; # rules difference and glob-tree come from boost project
# (C) Copyright David Abrahams and Carlos Pinto Coelho 2001. Permission to
# copy, use, modify, sell and distribute this software is granted provided this
# copyright notice appears in all copies. This software is provided "as is"
# without express or implied warranty, and with no claim as to its suitability
# for any purpose.
rule RuntimeFiles # difference listB : listA
# returns the elements of B that are not in A
rule difference
{ {
local result = ;
local vimRuntimeFiles = [ GLOB $(<) : *.vim *.txt *.info *.ps ] ; local element ;
for element in $(<)
for file in $(vimRuntimeFiles:D=) {
{ if ! ( $(element) in $(>) )
MakeLocate <etc>$(file) : [ FDirName $(VIMDIR) $(<) ] ; {
File <etc>$(file) : $(file) ; result += $(element) ;
LocalClean clean : <etc>$(file) ; }
} }
return $(result) ;
SEARCH on $(vimRuntimeFiles:D=) = $(<) ;
} }
RuntimeFiles $(SUBDIR) ; # Recursive version of GLOB. Builds the glob of files while
RuntimeFiles [ FDirName $(SUBDIR) colors ] ; # also searching in the subdirectories of the given root.
RuntimeFiles [ FDirName $(SUBDIR) compiler ] ; #
RuntimeFiles [ FDirName $(SUBDIR) doc ] ; rule glob-tree
RuntimeFiles [ FDirName $(SUBDIR) ftplugin ] ; {
RuntimeFiles [ FDirName $(SUBDIR) indent ] ; local e ;
RuntimeFiles [ FDirName $(SUBDIR) keymap ] ; local f = [ GLOB $(<) : $(>) ] ;
#RuntimeFiles [ FDirName $(SUBDIR) lang ] ; local files ;
RuntimeFiles [ FDirName $(SUBDIR) macros ] ; for e in $(f)
RuntimeFiles [ FDirName $(SUBDIR) macros hanoi ] ; {
RuntimeFiles [ FDirName $(SUBDIR) macros life ] ; if $(e:D=) != CVS { files += $(e) ; }
RuntimeFiles [ FDirName $(SUBDIR) macros maze ] ; }
RuntimeFiles [ FDirName $(SUBDIR) macros urm ] ; local d = [ difference [ GLOB $(<) : * ] : $(files) ] ;
RuntimeFiles [ FDirName $(SUBDIR) plugin ] ; for e in $(d)
RuntimeFiles [ FDirName $(SUBDIR) print ] ; {
RuntimeFiles [ FDirName $(SUBDIR) syntax ] ; if ! ( $(e:D=) in . .. ) { files += [ glob-tree $(e) : $(>) ] ; }
RuntimeFiles [ FDirName $(SUBDIR) tools ] ; }
RuntimeFiles [ FDirName $(SUBDIR) tutor ] ; return $(files) ;
}
local VIMDIR = $(OBOS_ETC_DIR) vim vim63 ;
local vimRuntimeFiles = [ glob-tree $(SUBDIR) : *.vim *.txt *.info *.ps ] ;
for file in [ FGristFiles $(vimRuntimeFiles) ]
{
local dir = [ SplitPath $(file:D) ] ;
local sdir = [ SplitPath $(SUBDIR) ] ;
FStripCommon dir : sdir ;
local grist = [ FGrist etc vim vim63 $(dir) $(file:B) ] ;
local destfile = $(file:D=:G=$(grist)) ;
MakeLocate $(destfile) : [ FDirName $(VIMDIR) $(dir) ] ;
File $(destfile) : $(file) ;
LocalClean clean : $(destfile) ;
SEARCH on $(file) = $(SEARCH_SOURCE) [ FDirName $(SUBDIR) $dir) ] ;
}