From 69de9c6e3c1daea8faa57c9351d84e671a64222d Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 7 Jun 2013 15:17:42 +0200 Subject: [PATCH] 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. --- src/data/mime_db/Jamfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/data/mime_db/Jamfile b/src/data/mime_db/Jamfile index d35cb722e9..a2bbb85647 100644 --- a/src/data/mime_db/Jamfile +++ b/src/data/mime_db/Jamfile @@ -27,11 +27,11 @@ rule BuildMimeDB superTypes # Note: The subtype name may contain '.'s. Hence we cannot use # ":S=.rsrc". compiledSubType = $(compiledSubType:G=mimedb-sub-$(superType:B)) ; - ResComp $(compiledSubType) : $(subType) ; MakeLocate $(compiledSubType) : [ FDirName $(COMMON_PLATFORM_LOCATE_TARGET) $(superType:B) ] ; - # need to relocate to avoid clashes between equally named - # subtypes of different supertypes + # Need to locate explicitly to avoid clashes between equally + # named subtypes of different supertypes. + ResComp $(compiledSubType) : $(subType) ; compiledSubTypes += $(compiledSubType) ; } @@ -86,7 +86,7 @@ superTypeFiles = $(superTypeFiles:BSG=mimedb) ; SEARCH on $(superTypeFiles) = $(SUBDIR) ; # for each supertype glob the subtype source files -local superType ; +local superTypeFile ; for superTypeFile in $(superTypeFiles) { local superTypeDirectory = [ FDirName $(SUBDIR) $(superTypeFile:B) ] ; local subTypeFiles = [ Glob $(superTypeDirectory) : * ] ; @@ -95,7 +95,7 @@ for superTypeFile in $(superTypeFiles) { local subType ; for subType in $(subTypeFiles:BS) { if $(subType) != "." && $(subType) != ".." { - subType = $(subType:G=mimedb-sub) ; + subType = $(subType:G=mimedb-sub-$(superTypeFile:B)) ; SEARCH on $(subType) = $(superTypeDirectory) ; subTypes += $(subType) ; }