|
Boost-Build : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-26 11:15:14
Looking things over more closely...
One thing I'm really unhappy about with this submission is the amount of
code duplication. The current sources are already hard-to-maintain; any new
code duplication should really be considered unacceptable. Also, why is
TEMPLATE a target type? It really doesn't seem to me that a template should
be treated as a target.
-Dave
----- Original Message -----
From: "Thomas Witt" <witt_at_[hidden]>
To: <jamboost_at_[hidden]>
Sent: Tuesday, February 26, 2002 10:22 AM
Subject: Re: [jamboost] patch boost-base.jam project wide settings
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dave,
>
> On Tuesday 26 February 2002 15:34, David Abrahams wrote:
> > Hi Thomas,
> >
> > your diffs don't appear to correspond to the current CVS state, so I
can't
> > apply your patch.
>
> It seems I mixed up the names. Swapping the names in the header should
make
> the problem go away. Anyway I made a new patch that should work, though I
use
> diff/patch seldomly so I may still miss a point. Sorry for the
inconvenience.
>
> > I am wondering a bit why the "template" solution is superior to using
> > global variables which contain the dependencies.
>
> The main reason is, it never came to my mind using global variables for
this.
> One advantage of templates is that they can be located anywhere in the
project
> tree. The other advantage is they are not global variables :-). Seriously
I
> think template is more expressive compared to global variables.
>
> > Also, have you considered
> > how this would interact with the proposed "project/subproject-as-target"
> > feature?
>
> Nope, the intent was to have a temporary solution as long as v2 is not
> available. My understanding was that development of v1 with regard to new
> features stopped some time ago. I badly needed to manage global settings
> and I did not think about global variables.
>
> The template "feature" was designed so that current behaviour does not
change.
> Anybody not using templates will not notice any change in behaviour or
> runtime. So those who think they benefit from the fix can use it and fix
> their Jamfiles when moving to v2. All others are not affected.
>
> > I certainly would like to have documentation before committing
> > something of this magnitude.
>
> This was not intended as a "come'on apply this patch fast" message.
> I will write the documentation if we/you decide it/something like this
should
> go in. And it's ok for me to commit after documentation work is finished.
>
> There is only minimal change to the existing code with regard to template.
> Nearly the whole functionality is realised in new code. The only "old"
rule
> affected is declare-local-target. If template is dropped I would like to
add
> hooks to declare-local-target to implement it locally.
>
> This is not true for the with-command-file change. This is mostly existing
> code that is modified, but still the changes should not affect current
> behaviour. This change is not directly related to template. I think it is
> needed with or without template.
>
> Thomas
>
> >
> > Thanks for your work,
> > Dave
> >
> >
> > ----- Original Message -----
> > From: "Thomas Witt" <witt_at_[hidden]>
> > To: <jamboost_at_[hidden]>
> > Sent: Tuesday, February 26, 2002 6:08 AM
> > Subject: [jamboost] patch boost-base.jam project wide settings
> >
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > >
> > > Hi,
> > >
> > > The attached patch introduces a new rule template that can be used to
> > > conveniently define project wide requirements. Furthermore
> > > a change to the with-command-file rule is made to allow for
> > > additional prefix string that contains non-sources. I need this to
> >
> > circumvent
> >
> > > cmdline restrictions with long libpathes on windows.
> > >
> > > Here is an example of template usage.
> > >
> > > #
> > > # Defining requirements template
> > > #
> > > template TplBase
> > >
> > >
> > > # requirements
> > > <include>../myinclude
> > > <define>TEMPLATE
> > > # build not covered so far.
> > > ;
> > >
> > > #
> > > # Defining another requirements template
> > > # that inherits requirements
> > > #
> > > template TplDerived
> > >
> > > # only <template> dependencies go here
> > > <template>TplBase
> > >
> > > <include>../anotherinclude
> > > <define>DERIVED_TEMPLATE
> > > ;
> > >
> > > #
> > > # Exe that uses requirements from TplDerived
> > > #
> > > exe MyExe
> > >
> > > main.cpp
> > > <template>TplDerived
> > >
> > >
> > > debug
> > > ;
> > >
> > > I am using template in two projects and it reduces the maintenance
work
> > > by at least an order of magnitude. Currently template covers only
> > > requirements but I think it can be extended to cover build settings
to.
> >
> > The
> >
> > > need for requirements was just more pressing :-). If this goes in I
will
> > > happily update the documentation.
> > >
> > > Thomas
> > >
> > > - --
> > > Dipl.-Ing. Thomas Witt
> > > Institut fuer Verkehrswesen, Eisenbahnbau und -betrieb, Universitaet
> >
> > Hannover
> >
> > > voice: +49(0) 511 762 - 4273, fax: +49(0) 511 762-3001
> > > http://www.ive.uni-hannover.de
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.0.6 (GNU/Linux)
> > > Comment: For info see http://www.gnupg.org
> > >
> > > iD8DBQE8e2yg0ds/gS3XsBoRAlOtAKCGvE3yuhgpMiGQZf4voYt/YQr2CwCfWEoa
> > > fv8flr9IuLiXrrp6vlELgX0=
> > > =4NKn
> > > -----END PGP SIGNATURE-----
> > >
> > >
> > > To unsubscribe from this group, send an email to:
> > > jamboost-unsubscribe_at_[hidden]
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> > To unsubscribe from this group, send an email to:
> > jamboost-unsubscribe_at_[hidden]
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> - --
> Dipl.-Ing. Thomas Witt
> Institut fuer Verkehrswesen, Eisenbahnbau und -betrieb, Universitaet
Hannover
> voice: +49(0) 511 762 - 4273, fax: +49(0) 511 762-3001
> http://www.ive.uni-hannover.de
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE8e6hO0ds/gS3XsBoRAhiiAJ9YzHrlNfOD1FKPCiBhW+1qVYKJhwCdEfGe
> snJv4THFdkEvCggVPhoFb0A=
> =m4ai
> -----END PGP SIGNATURE-----
>
>
> To unsubscribe from this group, send an email to:
> jamboost-unsubscribe_at_[hidden]
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk