[haiku-development] Re: using jam's "Depends"

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 24 Oct 2010 20:53:07 +0200

On 2010-10-24 at 01:51:55 [+0200], Matt Madia <mattmadia@xxxxxxxxx> wrote:
> On Sat, Oct 23, 2010 at 16:26,  <mattmadia@xxxxxxxxx> wrote:
> > Author: mmadia
> > Date: 2010-10-23 22:26:08 +0200 (Sat, 23 Oct 2010)
> > New Revision: 39090
> > Changeset: http://dev.haiku-os.org/changeset/39090
> >
> > Modified:
> >   haiku/trunk/Jamfile
> >   haiku/trunk/build/jam/LocaleRules
> > Log:
> > Introduced a pseudo-target "catkeys", for building all of the localized
> > applications. The eventual goal is to have jam package a catkeys.zip,
> > which can be provided to the application translation websites.
> 
> Following up on this ....
> 
> Basically, for some reason `jam -q AboutSystem` will only build the
> application.  It's catkey+catalog file won't be created.
> So, is it wrong to make a jam target depend on it's catalog file?
> 
> Index: build/jam/LocaleRules
> ===================================================================
> --- build/jam/LocaleRules       (revision 39090)
> +++ build/jam/LocaleRules       (working copy)
> @@ -152,4 +152,5 @@
> 
>         HAIKU_CATALOG_FILES on $(target) = $(catkeysFiles:S=.catalog) ;
>         HAIKU_CATALOG_SIGNATURE on $(target) = $(signature) ;
> +       Depends $(target) : $(catkeysFiles:S=.catalog) ;
>  }
> 
> ===================================
> 
> This will allow jam -q AboutSystem  (or jam -q catkeys or ...) to
> build both the application and its respective locale data files.

From a puristic point of view I'd say that requesting a build of the 
AboutSystem target should only build that target and all dependencies 
required for that build, not stuff that is more or less loosely related.

I don't even see a use case for which this would be handy. The catalogs are 
dropped somewhere in the generated tree. To actually make use of them one 
would have to copy them to some install location. Doing that with the build 
system one would use "on AboutSystem return $(HAIKU_CATALOG_FILES)" in 
either case, which would cause the files to be updated anyway.

So unless there's some good reason I miss, I'd vote against that dependency.

CU, Ingo

Other related posts: