diff --git a/build/jam/LocaleRules b/build/jam/LocaleRules index 21aac0e0d9..4d8b105fd8 100644 --- a/build/jam/LocaleRules +++ b/build/jam/LocaleRules @@ -57,8 +57,10 @@ rule ExtractCatalogEntries target : sources : signature : regexp SEARCH on $(sources) += $(SEARCH_SOURCE) ; + local subdir + = [ on $(signature) return $(HAIKU_CATALOGS_SUBDIR) ] ; MakeLocate $(target) - : [ FDirName $(HAIKU_CATALOGS_OBJECT_DIR) $(signature) ] ; + : [ FDirName $(HAIKU_CATALOGS_OBJECT_DIR) $(subdir) ] ; Depends $(target) : $(sources) collectcatkeys ; LocalClean clean : $(target).pre ; ExtractCatalogEntries1 $(target) : collectcatkeys $(sources) ; @@ -80,8 +82,10 @@ rule LinkApplicationCatalog target : sources : signature : language # if the fingerprint matches the one from the untranslated catalog for the # same file. + local subdir + = [ on $(signature) return $(HAIKU_CATALOGS_SUBDIR) ] ; MakeLocate $(target) - : [ FDirName $(HAIKU_CATALOGS_OBJECT_DIR) $(signature) ] ; + : [ FDirName $(HAIKU_CATALOGS_OBJECT_DIR) $(subdir) ] ; Depends $(target) : $(sources) linkcatkeys ; LocalClean clean : $(target) ; @@ -97,10 +101,10 @@ actions LinkApplicationCatalog1 -s $(HAIKU_CATALOG_SIGNATURE) -o "$(1)" } -rule DoCatalogs target : signature : sources : sourceLanguage : regexp +rule DoCatalogs target : signature : sources : sourceLanguage : regexp : subdir { # DoCatalogs : : [ : ] - # [ : ] + # [ : ] [ : ] # # Extracts the catkeys from a target's source files, generates the # default catalog from them, and also generates catalogs for all @@ -114,11 +118,16 @@ rule DoCatalogs target : signature : sources : sourceLanguage : regexp # the sources. Optional: default is "en". # regexp The regular expression used to parse the files. # Optional: default is matching be_catalog->GetString + # folder Optional: the subdirectory containing *.catkeys + + local subdir = $(SUBDIR_TOKENS[2-]) $(folder) ; + HAIKU_CATALOGS_SUBDIR on $(signature) = $(subdir) ; local generatedCatalog = [ FGristFiles $(sourceLanguage:E=en:S=.catalog) ] ; MakeLocate $(generatedCatalog) - : [ FDirName $(HAIKU_CATALOGS_OBJECT_DIR) $(signature) ] ; + : [ FDirName $(HAIKU_CATALOGS_OBJECT_DIR) $(subdir) ] ; + # generate catkeys file from sources ExtractCatalogEntries $(generatedCatalog:S=.catkeys) @@ -126,7 +135,7 @@ rule DoCatalogs target : signature : sources : sourceLanguage : regexp # find translations local translationsDir - = [ FDirName $(HAIKU_TOP) data catalogs $(SUBDIR_TOKENS[2-]) ] ; + = [ FDirName $(HAIKU_TOP) data catalogs $(folder) ] ; local translations = [ Glob $(translationsDir) : *.catkeys ] ; translations = [ FGristFiles $(translations:BS) ] ; SEARCH on $(translations) += $(translationsDir) ; diff --git a/src/bin/Jamfile b/src/bin/Jamfile index 2baabec525..bada2f4b13 100644 --- a/src/bin/Jamfile +++ b/src/bin/Jamfile @@ -215,9 +215,12 @@ StdBinCommands : libncurses.a : $(haiku-utils_rsrc) ; # Localization of some applications -DoCatalogs dstcheck : - x-vnd.Haiku-cmd-dstconfig +DoCatalogs dstcheck + : x-vnd.Haiku-cmd-dstconfig : dstcheck.cpp + : + : + : dstcheck ; SubInclude HAIKU_TOP src bin addattr ;