Fix #8841 (broken localization support for 3rd-party apps).

* made private Catalog.h header public by moving it to 
  os/locale/tools/CollectingCatalog.h
* reintroduce B_COLLECTING_CATKEYS define (which is expected to be set
  during a collectcatkeys session) in order to decide whether or not
  to automatically include the CollecingCatalog.h header from Catalog.h
* adjust jam rule for collecting catalog keys accordingly
This commit is contained in:
Oliver Tappe
2012-08-16 21:12:55 +02:00
parent 2bcc7f40c3
commit e19d7089a7
3 changed files with 15 additions and 14 deletions
+3 -6
View File
@@ -17,11 +17,7 @@ rule ExtractCatalogEntries target : sources : signature : regexp
defines = $(DEFINES) ;
headers = $(HAIKU_CONFIG_HEADERS) $(SEARCH_SOURCE) $(SUBDIRHDRS)
$(HDRS) ;
# insert specific header folder containing the Catalog.h that should be
# used when collecting the catalog keys:
sysHeaders = [ FDirName $(HAIKU_TOP) headers private locale collecting ]
$(SUBDIRSYSHDRS) $(SYSHDRS) ;
sysHeaders = $(SUBDIRSYSHDRS) $(SYSHDRS) ;
if $(PLATFORM) = host {
sysHeaders += $(HOST_HDRS) ;
@@ -71,7 +67,8 @@ rule ExtractCatalogEntries target : sources : signature : regexp
actions ExtractCatalogEntries1
{
$(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR)
cat "$(2[2-])" | $(CC) -E $(CCDEFS) $(HDRS) - > "$(1)".pre
cat "$(2[2-])" \
| $(CC) -E $(CCDEFS) -DB_COLLECTING_CATKEYS $(HDRS) - > "$(1)".pre
$(2[1]) $(HAIKU_CATALOG_REGEXP) -s $(HAIKU_CATALOG_SIGNATURE) \
-w -o "$(1)" "$(1)".pre
}