[haiku-commits] Re: r37871 - in haiku/trunk: build/jam src/bin

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 03 Aug 2010 17:00:26 +0200

On 2010-08-03 at 16:10:16 [+0200], pulkomandy@xxxxxxxxxxxxxxxxx wrote:
> Author: pulkomandy
> Date: 2010-08-03 16:10:15 +0200 (Tue, 03 Aug 2010)
> New Revision: 37871
> Changeset: http://dev.haiku-os.org/changeset/37871
> 
> Modified:
>    haiku/trunk/build/jam/LocaleRules
>    haiku/trunk/src/bin/Jamfile
> Log:
>  * Allow to put the different catalogs for the bin/ directory in spearate 
>  places in the generated folder.
>  *  I didn't manage to make it work for the translations, however. If 
>  someone with better jam knowledge could look at it...
> 
> 
> Modified: haiku/trunk/build/jam/LocaleRules
> ===================================================================
> --- haiku/trunk/build/jam/LocaleRules    2010-08-03 12:00:06 UTC (rev 37870)
> +++ haiku/trunk/build/jam/LocaleRules    2010-08-03 14:10:15 UTC (rev 37871)
> @@ -66,6 +66,7 @@
>  actions ExtractCatalogEntries1
>  {
>      $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR)
> +    mkdir -p "$(1:D)"
>      cat "$(2[2-])" \
>          | $(CC) -E $(CCDEFS) -DB_COLLECTING_CATKEYS $(HDRS) - > "$(1)".pre
>      $(2[1]) $(HAIKU_CATALOG_REGEXP) -s $(HAIKU_CATALOG_SIGNATURE) \
> @@ -91,11 +92,12 @@
>  actions LinkApplicationCatalog1
>  {
>      $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR)
> +    mkdir -p "$(1:D)"
>      $(2[1]) "$(2[2-])" -l $(HAIKU_CATALOG_LANGUAGE) \
>          -s $(HAIKU_CATALOG_SIGNATURE) -o "$(1)"
>  }
>  
> -rule DoCatalogs target : signature : sources : sourceLanguage : regexp
> +rule DoCatalogs target : signature : sources : sourceLanguage : regexp : 
> folder
>  {
>      # DoCatalogs <target> : <signature> : <sources> [ : <sourceLanguage> ]
>      #    [ : <regexp> ]
> @@ -112,8 +114,9 @@
>      #                    the sources. Optional: default is "en".
>      # regexp            The regular expression used to parse the files.
>      #                   Optional: default is matching be_catalog->GetString
> +    # folder            Subfolder where to put the generated files. 
> Optional.
>  
> -    local generatedCatalog = [ FGristFiles 
> $(sourceLanguage:E=en:S=.catalog) ] ;
> +    local generatedCatalog = [ FGristFiles 
> $(sourceLanguage:E=en:S=.catalog:D=$(folder)) ] ;

That's not The Way (tm). Save for directories targets should never have a 
directory component. Instead locate the target (via MakeLocate*) 
respectively. That will also create the missing subdirectories.

That aside, I guess one could use a fixed output directory and simply always 
use the signature as a subdirectory, thus making the additional parameter 
superfluous.

Feel free to do that. Otherwise I'll try to find some time in a day or two.

CU, Ingo

Other related posts: