MIME DB build: Fix name clashes
* Make grist for subtype source files unique. * Our MakeLocate only appends to LOCATE, so we have to call it before ResComp, if we want a different location.
This commit is contained in:
@@ -27,11 +27,11 @@ rule BuildMimeDB superTypes
|
|||||||
# Note: The subtype name may contain '.'s. Hence we cannot use
|
# Note: The subtype name may contain '.'s. Hence we cannot use
|
||||||
# ":S=.rsrc".
|
# ":S=.rsrc".
|
||||||
compiledSubType = $(compiledSubType:G=mimedb-sub-$(superType:B)) ;
|
compiledSubType = $(compiledSubType:G=mimedb-sub-$(superType:B)) ;
|
||||||
ResComp $(compiledSubType) : $(subType) ;
|
|
||||||
MakeLocate $(compiledSubType)
|
MakeLocate $(compiledSubType)
|
||||||
: [ FDirName $(COMMON_PLATFORM_LOCATE_TARGET) $(superType:B) ] ;
|
: [ FDirName $(COMMON_PLATFORM_LOCATE_TARGET) $(superType:B) ] ;
|
||||||
# need to relocate to avoid clashes between equally named
|
# Need to locate explicitly to avoid clashes between equally
|
||||||
# subtypes of different supertypes
|
# named subtypes of different supertypes.
|
||||||
|
ResComp $(compiledSubType) : $(subType) ;
|
||||||
compiledSubTypes += $(compiledSubType) ;
|
compiledSubTypes += $(compiledSubType) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ superTypeFiles = $(superTypeFiles:BSG=mimedb) ;
|
|||||||
SEARCH on $(superTypeFiles) = $(SUBDIR) ;
|
SEARCH on $(superTypeFiles) = $(SUBDIR) ;
|
||||||
|
|
||||||
# for each supertype glob the subtype source files
|
# for each supertype glob the subtype source files
|
||||||
local superType ;
|
local superTypeFile ;
|
||||||
for superTypeFile in $(superTypeFiles) {
|
for superTypeFile in $(superTypeFiles) {
|
||||||
local superTypeDirectory = [ FDirName $(SUBDIR) $(superTypeFile:B) ] ;
|
local superTypeDirectory = [ FDirName $(SUBDIR) $(superTypeFile:B) ] ;
|
||||||
local subTypeFiles = [ Glob $(superTypeDirectory) : * ] ;
|
local subTypeFiles = [ Glob $(superTypeDirectory) : * ] ;
|
||||||
@@ -95,7 +95,7 @@ for superTypeFile in $(superTypeFiles) {
|
|||||||
local subType ;
|
local subType ;
|
||||||
for subType in $(subTypeFiles:BS) {
|
for subType in $(subTypeFiles:BS) {
|
||||||
if $(subType) != "." && $(subType) != ".." {
|
if $(subType) != "." && $(subType) != ".." {
|
||||||
subType = $(subType:G=mimedb-sub) ;
|
subType = $(subType:G=mimedb-sub-$(superTypeFile:B)) ;
|
||||||
SEARCH on $(subType) = $(superTypeDirectory) ;
|
SEARCH on $(subType) = $(superTypeDirectory) ;
|
||||||
subTypes += $(subType) ;
|
subTypes += $(subType) ;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user