Re: [proposal] replace build.pl with a central Makefile.

2013-10-21 Thread janI
On 21 October 2013 15:52, Andre Fischer  wrote:

> On 21.10.2013 12:35, janI wrote:
>
>> [...]
>>
>> I have the following plan:
>> a) rename all Makefile to Makefile.gb, and correct prj/makefile.mk to the
>> new name
>>
>
> prj/makefile.mk usually only contains a simple forwarding.  This would
> mean that making a gbuild module would require two forwards, one from the
> global Makefile to prj/makefile.mk and one from there to ./Makefile.
> Maybe prj/makefile.mk could be removed and ./Makefile be called directly
> from the global Makefile?


Would be a lot easier, I have looked at tweaking build.pl to accept make
along with nmake, and then call make instead of dmake, but I have had a lot
of success. Any help would be apriciated.


>
>
>  b) for each  add a new Makefile, that basically call the existing
>> makefile.mk, as per your script (and build.lst) and update build.lst
>>
>
> I would suggest to do this forwarding with a macro, so that when there are
> any changes in the future, we only have to change the macro once instead of
> every forwarding call.
> A while back I modified the forwarding calls for gbuild modules (from prj/
> makefile.mk to ./Makefile) to include the debug flag. Would have been
> easier when all had used the same macro.

good idea.

>
>
>  c) add deliver.lst to Makefile and update build.lst
>>
>
> Are deliver.lst and build.lst still used after this change?  If not, can
> you delete them?

yes, I do that at a later step, when I am sure the new Makefile works.


>
>
>
>> once done, both build.pl and main/Makefile will work in the branch.
>>
>> d) have all of you test, and critic the idea.
>> e) remove */prj and build.pl
>> f) integrate in trunk.
>>
>
> Sounds good to me, with or without changes according to my suggestions.
>

thx.
rgds
jan I.

>
> -Andre
>
>
>> rgds
>> jan I.
>>
>>
>>
>>
>>  -Andre
>>>
>>>
>>>
>>>  hope you like it.
 rgds
 jan I.





>
>
>  While this is easy to do with eg Perl I am not sure how to handle
>>
>>> this
>>>
>>>  with just a Makefile.  The straightforward approach with handling
 .done files does not work.  And that is one of the reasons
 why

  I
>>>
>> don't think that (GNU) makefiles are a good solution for any problem.
>>
>>>Most
 of us are used to program object oriented/imperative.  Makefiles

  require
>>>
>> a
>>
>>> declarative approach. Maybe the use of Perl is not such a bad idea.
Maybe
 it would be better to reimplement build.pl with a lot fewer options

  and
>>>
>> with better readable code.
>>
>>>I agree that makefiles are nowhere near a good solution to many of

  these
>>>
>> problems, but its like windows, I dont like it, but everybody uses it.
>>
>>> We could easily write a new build.pl, that also took care of the
>>> local
>>> makefiles, but our build system would not be in the mainstream, and
>>> e.g.
>>> the distros would not like to integrate AOO.
>>>
>>> I have over the last years followed research in building systems, and
>>> there
>>> are (sadly enough) nobody that tries a real object oriented aproach.
>>>
>>>  Also
>> if you look at packages like visual studio, QT, eclipse they all use
>> the
>>
>>> principle of makefiles with declarative approach.
>>>
>>> So my simple question is, do we want to approach the main road
>>>
>>>  (makefiles
>> for unix, visual studio for windows/mac) or do we want to have better
>> but
>> non standard system.
>>
>>>   Good analysis.  Maybe I should answer with Faust: "Zwei Seelen
>>> wohnen,
>>>
>> ach! in meiner Brust" (two souls alas! are dwelling in my breast).
>>  The
>> pragmatist says to use the make.  It is good enough for others, it is
>>
>>  good
>
>  enough for use.
>> On the other hand, when I start a new project I usually start with the
>> question of what are the best tools for the problem at hand. And make
>>
>>  does
>
>  not seem to be the first or the best answer.  Look at our dmake or
>> gbuild
>> system.  Both don't use make in a standard way. gmake even defines its
>>
>>  own
>
>  language, object oriented and imperative, on top of the GNU make
>> macros.
>>That is, for me, an act of desperation.
>> I have made experiments with an alternative approach, a domain
>> specific
>> language somewhat similar to Java.  I personally like this approach
>>
>>  because
>
>  a) it uses the paradigm that I already use when writing C++ code. That
>> means that I can apply my existing knowledge to the build process and
>>
>>  that
>
>  I don't have to remember all the tricks and pitfalls of makefiles.
>> b) as expected it was

Re: [proposal] replace build.pl with a central Makefile.

2013-10-21 Thread Andre Fischer

On 21.10.2013 12:35, janI wrote:

[...]
I have the following plan:
a) rename all Makefile to Makefile.gb, and correct prj/makefile.mk to the
new name


prj/makefile.mk usually only contains a simple forwarding.  This would 
mean that making a gbuild module would require two forwards, one from 
the global Makefile to prj/makefile.mk and one from there to 
./Makefile.   Maybe prj/makefile.mk could be removed and ./Makefile be 
called directly from the global Makefile?



b) for each  add a new Makefile, that basically call the existing
makefile.mk, as per your script (and build.lst) and update build.lst


I would suggest to do this forwarding with a macro, so that when there 
are any changes in the future, we only have to change the macro once 
instead of every forwarding call.
A while back I modified the forwarding calls for gbuild modules (from 
prj/makefile.mk to ./Makefile) to include the debug flag. Would have 
been easier when all had used the same macro.



c) add deliver.lst to Makefile and update build.lst


Are deliver.lst and build.lst still used after this change?  If not, can 
you delete them?




once done, both build.pl and main/Makefile will work in the branch.

d) have all of you test, and critic the idea.
e) remove */prj and build.pl
f) integrate in trunk.


Sounds good to me, with or without changes according to my suggestions.

-Andre



rgds
jan I.





-Andre




hope you like it.
rgds
jan I.









While this is easy to do with eg Perl I am not sure how to handle

this


with just a Makefile.  The straightforward approach with handling
.done files does not work.  And that is one of the reasons why


I

don't think that (GNU) makefiles are a good solution for any problem.

   Most
of us are used to program object oriented/imperative.  Makefiles


require

a

declarative approach. Maybe the use of Perl is not such a bad idea.
   Maybe
it would be better to reimplement build.pl with a lot fewer options


and

with better readable code.

   I agree that makefiles are nowhere near a good solution to many of


these

problems, but its like windows, I dont like it, but everybody uses it.

We could easily write a new build.pl, that also took care of the local
makefiles, but our build system would not be in the mainstream, and
e.g.
the distros would not like to integrate AOO.

I have over the last years followed research in building systems, and
there
are (sadly enough) nobody that tries a real object oriented aproach.


Also
if you look at packages like visual studio, QT, eclipse they all use the

principle of makefiles with declarative approach.

So my simple question is, do we want to approach the main road


(makefiles
for unix, visual studio for windows/mac) or do we want to have better
but
non standard system.

  Good analysis.  Maybe I should answer with Faust: "Zwei Seelen wohnen,

ach! in meiner Brust" (two souls alas! are dwelling in my breast).  The
pragmatist says to use the make.  It is good enough for others, it is


good


enough for use.
On the other hand, when I start a new project I usually start with the
question of what are the best tools for the problem at hand. And make


does


not seem to be the first or the best answer.  Look at our dmake or
gbuild
system.  Both don't use make in a standard way. gmake even defines its


own


language, object oriented and imperative, on top of the GNU make macros.
   That is, for me, an act of desperation.
I have made experiments with an alternative approach, a domain specific
language somewhat similar to Java.  I personally like this approach


because


a) it uses the paradigm that I already use when writing C++ code. That
means that I can apply my existing knowledge to the build process and


that


I don't have to remember all the tricks and pitfalls of makefiles.
b) as expected it was much easier to handle file dependencies and


parallel


processing of build jobs in Java than adding object orientation and
imperative control flow to makefiles.

If I had the time and if I would be the one working on it then I would
prefer an non-Makefile approach.  But maybe I am just suffering too much
from one of the 'three great virtues of a programmer': hubris.

You are the one who leads the build project changes, so you have to


decide


which approach to use.  I am not trying to make your life harder (than
necessary), I am only trying to point out some of the pitfalls that I


have


encountered in the past.  And to prevent you from removing features that


I


use :-)




  rgds

jan I.

Ps. its always refreshing to discuss with you, you often have an
alternative approach, which is not just a dream but doable.

  Thanks. That makes two of us.

Have a nice weekend,
Andre



-Andre

 --prepare


   Also one option that is important for our every day work.  Use

case:
You make changes in  and are not sure if these changes are
compatible/incompatible.  To be on the safe side you discard the


output

of

all depending modules

Re: [proposal] replace build.pl with a central Makefile.

2013-10-21 Thread janI
On 21 October 2013 10:58, Andre Fischer  wrote:

> On 20.10.2013 12:40, janI wrote:
>
>> On 19 October 2013 19:20, Kay Schenk  wrote:
>>
>>  On Fri, Oct 18, 2013 at 7:52 AM, Andre Fischer 
>>> wrote:
>>>
>>>  On 18.10.2013 15:58, janI wrote:

  On 18 October 2013 15:00, Andre Fischer  wrote:
>
>   On 18.10.2013 14:02, janI wrote:
>
>>   sd
>>
>>>
>>> On 18 October 2013 13:36, Andre Fischer  wrote:
>>>
>>>On 18.10.2013 11:32, janI wrote:
>>>
>>> Hi.

  due to the discussion in thread "Mentor a new build system", I have
> made a
> proposal for a central Makefile located in main.
>
>Hi Jan,
>
>  it is great that you are going to improve this part of the build
 system.
 But I think that we need more details about how the proposed
 build
 system
 works.  Without them I can not really evaluate the proposal.

First of all, I agree with juergens remarks that this should be

  discussed
>>> before implemented, hence the wiki page.
>>>
>>> Secondly this has nothing directly to do with the proposed build
>>>
>> system,
>>>
 its a simple replacement of build.pl in the current system.
>>>
>>>   Yes, that is how I understood it.  I just did not know how to call
>>>
>> the
>>>
 build.pl replacement.
>>
>>
>>
>>   I know that build.pl works, but having a Makefile in main, would
>> make
>>
>>> us
>>> one step closer on being compatible with the distros. To me this job
>>>
>> is
>>>
 a
>>> simple cleanup, not something we deadly need, but nice to have.
>>>
>>>
>>>Some remarks regarding the missing options:
>>>
>>>  --from 
   This is one of the more important options and one that I use
 frequently
 (also in the form --all:).
   Note that if you are in  and call 'make --from

>>> '
>>>
 then
 all modules are built
   a) which  depends on
   b) but not those that  depends on
   c) Both  and  are built.

I have changed the documentation.

  I use the --all: myself very often, and have changed the
>>> documentation, because it is of course supported.
>>>
>>> The difference is that you do the call in main, but that is a minor
>>> detail
>>> that can be easily corrected (have /Makefile calling
>>> main/Makefile.
>>>
>>> I have also changed documentation on --html due to juergens comments.
>>>
>>>   I am not sure that we understand --from and --since in the same way
>>>
>> so
>>>
 I
>> will try to explain what I think they do.
>>
>> Let's imagine that we have a simple project with modules A, B, C, D
>> and
>> E.
>> where B depends on A, C on B, D on C, and E on D.
>> A ' make all' would mean 'make E'.  The dependencies would then lead
>> to
>> building modules A, B, C, D, E in this order.
>> If I am in E and call 'make --from C' then only C, D, and E should be
>> built.  A 'make --since C' would only build D and E.
>>
>> If I am in D and call 'make --from B' then modules B, C, and D are
>>
> built.
>>>
Call 'make --since B' to build only C and D.
>> Note that 'make --from' accepts more than one module name (while 'make
>> --all:' does not).
>> Note also that in the above case (stand in D, call 'make --from B')
>> module
>> A is not built, regardless of whether there are changes in A or not.
>>Whereas a simple call to make (still standing in D) would build all
>> modules that D depends on, directly or indirectly.  Thus the options
>> '--from' and '--since' exist to actively exclude modules from being
>> built.
>>
>> The whole thing becomes a little bit more complicated with multiple
>> options to '--from' (I never use '--since' and also don't know a valid
>> use
>> case so I will ignore it for now) and more complex dependencies then
>> in
>> the
>> simple example above.  Let's say that if we stand in instsetoo_native
>>
> and
>>>
 call 'make --from svx sfx2'.  Note that svx depends on sfx2.  This
>>
> would
>>>
 build svx, sfx2 and all modules that depend (directly or indirectly) on
>> svx
>> OR sfx2.
>>
>>   got it, now I just have one problem, why would you not build the
>>
> dependent
> modules, if they needed to be built, thats a scenario I dont
> understand.
> With a central makefile, /makefile will not be called so we do
>
 not
>>>
 waste cpu cycles.
>
> With the .done files, we know when a module was last built and all
>
 modules
>>>
 that depend it should be rebuilt which the rule
> .done :

Re: [proposal] replace build.pl with a central Makefile.

2013-10-21 Thread janI
On 21 October 2013 10:50, Andre Fischer  wrote:

> On 18.10.2013 19:54, janI wrote:
>
>> On 18 October 2013 16:52, Andre Fischer  wrote:
>>
>>  On 18.10.2013 15:58, janI wrote:
>>>
>>>  On 18 October 2013 15:00, Andre Fischer  wrote:

   On 18.10.2013 14:02, janI wrote:

>   sd
>
>>
>> On 18 October 2013 13:36, Andre Fischer  wrote:
>>
>>On 18.10.2013 11:32, janI wrote:
>>
>> Hi.
>>>
>>>  due to the discussion in thread "Mentor a new build system", I have
 made a
 proposal for a central Makefile located in main.

Hi Jan,

  it is great that you are going to improve this part of the build
>>> system.
>>> But I think that we need more details about how the proposed
>>> build
>>> system
>>> works.  Without them I can not really evaluate the proposal.
>>>
>>>First of all, I agree with juergens remarks that this should be
>>>
>>>  discussed
>> before implemented, hence the wiki page.
>>
>> Secondly this has nothing directly to do with the proposed build
>> system,
>> its a simple replacement of build.pl in the current system.
>>
>>   Yes, that is how I understood it.  I just did not know how to call
>> the
>>
> build.pl replacement.
>
>
>
>   I know that build.pl works, but having a Makefile in main, would
> make
>
>> us
>> one step closer on being compatible with the distros. To me this job
>> is
>> a
>> simple cleanup, not something we deadly need, but nice to have.
>>
>>
>>Some remarks regarding the missing options:
>>
>>  --from 
>>>   This is one of the more important options and one that I use
>>> frequently
>>> (also in the form --all:).
>>>   Note that if you are in  and call 'make --from
>>> '
>>> then
>>> all modules are built
>>>   a) which  depends on
>>>   b) but not those that  depends on
>>>   c) Both  and  are built.
>>>
>>>I have changed the documentation.
>>>
>>>  I use the --all: myself very often, and have changed the
>> documentation, because it is of course supported.
>>
>> The difference is that you do the call in main, but that is a minor
>> detail
>> that can be easily corrected (have /Makefile calling
>> main/Makefile.
>>
>> I have also changed documentation on --html due to juergens comments.
>>
>>   I am not sure that we understand --from and --since in the same way
>> so
>>
> I
> will try to explain what I think they do.
>
> Let's imagine that we have a simple project with modules A, B, C, D and
> E.
> where B depends on A, C on B, D on C, and E on D.
> A ' make all' would mean 'make E'.  The dependencies would then lead to
> building modules A, B, C, D, E in this order.
> If I am in E and call 'make --from C' then only C, D, and E should be
> built.  A 'make --since C' would only build D and E.
>
> If I am in D and call 'make --from B' then modules B, C, and D are
> built.
>Call 'make --since B' to build only C and D.
> Note that 'make --from' accepts more than one module name (while 'make
> --all:' does not).
> Note also that in the above case (stand in D, call 'make --from B')
> module
> A is not built, regardless of whether there are changes in A or not.
>Whereas a simple call to make (still standing in D) would build all
> modules that D depends on, directly or indirectly.  Thus the options
> '--from' and '--since' exist to actively exclude modules from being
> built.
>
> The whole thing becomes a little bit more complicated with multiple
> options to '--from' (I never use '--since' and also don't know a valid
> use
> case so I will ignore it for now) and more complex dependencies then in
> the
> simple example above.  Let's say that if we stand in instsetoo_native
> and
> call 'make --from svx sfx2'.  Note that svx depends on sfx2.  This
> would
> build svx, sfx2 and all modules that depend (directly or indirectly) on
> svx
> OR sfx2.
>
>   got it, now I just have one problem, why would you not build the
>
 dependent
 modules, if they needed to be built, thats a scenario I dont understand.
 With a central makefile, /makefile will not be called so we do
 not
 waste cpu cycles.

 With the .done files, we know when a module was last built and all
 modules
 that depend it should be rebuilt which the rule
 .done : .done

 will ensure, so If we have A -> B -> C -> D

 I go in B, and call make, then when I go in D and make, B,C,D will be
 made.

 If we have A -> B -> D   C -> D
 and do the same then only D will be made.

 So --from is not really saving anythin

Re: [proposal] replace build.pl with a central Makefile.

2013-10-21 Thread Andre Fischer

On 20.10.2013 12:40, janI wrote:

On 19 October 2013 19:20, Kay Schenk  wrote:


On Fri, Oct 18, 2013 at 7:52 AM, Andre Fischer  wrote:


On 18.10.2013 15:58, janI wrote:


On 18 October 2013 15:00, Andre Fischer  wrote:

  On 18.10.2013 14:02, janI wrote:

  sd


On 18 October 2013 13:36, Andre Fischer  wrote:

   On 18.10.2013 11:32, janI wrote:


   Hi.


due to the discussion in thread "Mentor a new build system", I have
made a
proposal for a central Makefile located in main.

   Hi Jan,


it is great that you are going to improve this part of the build
system.
But I think that we need more details about how the proposed build
system
works.  Without them I can not really evaluate the proposal.

   First of all, I agree with juergens remarks that this should be


discussed
before implemented, hence the wiki page.

Secondly this has nothing directly to do with the proposed build

system,

its a simple replacement of build.pl in the current system.

  Yes, that is how I understood it.  I just did not know how to call

the

build.pl replacement.



  I know that build.pl works, but having a Makefile in main, would make

us
one step closer on being compatible with the distros. To me this job

is

a
simple cleanup, not something we deadly need, but nice to have.


   Some remarks regarding the missing options:


--from 
  This is one of the more important options and one that I use
frequently
(also in the form --all:).
  Note that if you are in  and call 'make --from

'

then
all modules are built
  a) which  depends on
  b) but not those that  depends on
  c) Both  and  are built.

   I have changed the documentation.


I use the --all: myself very often, and have changed the
documentation, because it is of course supported.

The difference is that you do the call in main, but that is a minor
detail
that can be easily corrected (have /Makefile calling
main/Makefile.

I have also changed documentation on --html due to juergens comments.

  I am not sure that we understand --from and --since in the same way

so

I
will try to explain what I think they do.

Let's imagine that we have a simple project with modules A, B, C, D and
E.
where B depends on A, C on B, D on C, and E on D.
A ' make all' would mean 'make E'.  The dependencies would then lead to
building modules A, B, C, D, E in this order.
If I am in E and call 'make --from C' then only C, D, and E should be
built.  A 'make --since C' would only build D and E.

If I am in D and call 'make --from B' then modules B, C, and D are

built.

   Call 'make --since B' to build only C and D.
Note that 'make --from' accepts more than one module name (while 'make
--all:' does not).
Note also that in the above case (stand in D, call 'make --from B')
module
A is not built, regardless of whether there are changes in A or not.
   Whereas a simple call to make (still standing in D) would build all
modules that D depends on, directly or indirectly.  Thus the options
'--from' and '--since' exist to actively exclude modules from being
built.

The whole thing becomes a little bit more complicated with multiple
options to '--from' (I never use '--since' and also don't know a valid
use
case so I will ignore it for now) and more complex dependencies then in
the
simple example above.  Let's say that if we stand in instsetoo_native

and

call 'make --from svx sfx2'.  Note that svx depends on sfx2.  This

would

build svx, sfx2 and all modules that depend (directly or indirectly) on
svx
OR sfx2.

  got it, now I just have one problem, why would you not build the

dependent
modules, if they needed to be built, thats a scenario I dont understand.
With a central makefile, /makefile will not be called so we do

not

waste cpu cycles.

With the .done files, we know when a module was last built and all

modules

that depend it should be rebuilt which the rule
.done : .done

will ensure, so If we have A -> B -> C -> D

I go in B, and call make, then when I go in D and make, B,C,D will be
made.

If we have A -> B -> D   C -> D
and do the same then only D will be made.

So --from is not really saving anything ?


a) In your example you first go into B then, in a second step, into D.
  The '--from' option lets you do the same (well, not really the same, but
see below) just from D.

b) You go first to B and call make.  This makes A, if necessary, then B.
  The making of A is exactly the thing that you want to prevent with the
'--from' option.  Go into D and call 'make --from B'.  A is not built.

c) After the discussion with you I am not sure if we still need --from
because the two reasons I know for its existence my not be relevant with
the new approach.

c1) With the '--from' option you can tweak the dependency rules at

runtime

(a bit).  This allows you to exclude projects from being built when you
know that that is not necessary.  But from experience I know that can

lead

to very subtle errors.  Letting the system determine what to built is
usually more reliab

Re: [proposal] replace build.pl with a central Makefile.

2013-10-21 Thread Andre Fischer

On 18.10.2013 19:54, janI wrote:

On 18 October 2013 16:52, Andre Fischer  wrote:


On 18.10.2013 15:58, janI wrote:


On 18 October 2013 15:00, Andre Fischer  wrote:

  On 18.10.2013 14:02, janI wrote:

  sd


On 18 October 2013 13:36, Andre Fischer  wrote:

   On 18.10.2013 11:32, janI wrote:


   Hi.


due to the discussion in thread "Mentor a new build system", I have
made a
proposal for a central Makefile located in main.

   Hi Jan,


it is great that you are going to improve this part of the build
system.
But I think that we need more details about how the proposed build
system
works.  Without them I can not really evaluate the proposal.

   First of all, I agree with juergens remarks that this should be


discussed
before implemented, hence the wiki page.

Secondly this has nothing directly to do with the proposed build system,
its a simple replacement of build.pl in the current system.

  Yes, that is how I understood it.  I just did not know how to call the

build.pl replacement.



  I know that build.pl works, but having a Makefile in main, would make

us
one step closer on being compatible with the distros. To me this job is
a
simple cleanup, not something we deadly need, but nice to have.


   Some remarks regarding the missing options:


--from 
  This is one of the more important options and one that I use
frequently
(also in the form --all:).
  Note that if you are in  and call 'make --from '
then
all modules are built
  a) which  depends on
  b) but not those that  depends on
  c) Both  and  are built.

   I have changed the documentation.


I use the --all: myself very often, and have changed the
documentation, because it is of course supported.

The difference is that you do the call in main, but that is a minor
detail
that can be easily corrected (have /Makefile calling
main/Makefile.

I have also changed documentation on --html due to juergens comments.

  I am not sure that we understand --from and --since in the same way so

I
will try to explain what I think they do.

Let's imagine that we have a simple project with modules A, B, C, D and
E.
where B depends on A, C on B, D on C, and E on D.
A ' make all' would mean 'make E'.  The dependencies would then lead to
building modules A, B, C, D, E in this order.
If I am in E and call 'make --from C' then only C, D, and E should be
built.  A 'make --since C' would only build D and E.

If I am in D and call 'make --from B' then modules B, C, and D are built.
   Call 'make --since B' to build only C and D.
Note that 'make --from' accepts more than one module name (while 'make
--all:' does not).
Note also that in the above case (stand in D, call 'make --from B')
module
A is not built, regardless of whether there are changes in A or not.
   Whereas a simple call to make (still standing in D) would build all
modules that D depends on, directly or indirectly.  Thus the options
'--from' and '--since' exist to actively exclude modules from being
built.

The whole thing becomes a little bit more complicated with multiple
options to '--from' (I never use '--since' and also don't know a valid
use
case so I will ignore it for now) and more complex dependencies then in
the
simple example above.  Let's say that if we stand in instsetoo_native and
call 'make --from svx sfx2'.  Note that svx depends on sfx2.  This would
build svx, sfx2 and all modules that depend (directly or indirectly) on
svx
OR sfx2.

  got it, now I just have one problem, why would you not build the

dependent
modules, if they needed to be built, thats a scenario I dont understand.
With a central makefile, /makefile will not be called so we do not
waste cpu cycles.

With the .done files, we know when a module was last built and all modules
that depend it should be rebuilt which the rule
.done : .done

will ensure, so If we have A -> B -> C -> D

I go in B, and call make, then when I go in D and make, B,C,D will be
made.

If we have A -> B -> D   C -> D
and do the same then only D will be made.

So --from is not really saving anything ?


a) In your example you first go into B then, in a second step, into D.
  The '--from' option lets you do the same (well, not really the same, but
see below) just from D.

b) You go first to B and call make.  This makes A, if necessary, then B.
  The making of A is exactly the thing that you want to prevent with the
'--from' option.  Go into D and call 'make --from B'.  A is not built.


Actually I go to main and say "make D", that will cause B but not A to be
built.


I guess that calling 'make D' from main/ would be equivalent to call it 
from instsetoo_native/.  But the --from option also works from inside 
other directories.  It can then be used to build a 'range' of modules, 
ie. go into module Y/ and call 'make --from X' and all modules from X/ 
to Y/ will be built.  A real life example for using this method could be:


1. Make some changes to documentation but not code in sfx2/.
2. Make some changes in svx/.
3. Then go 

Re: [proposal] replace build.pl with a central Makefile.

2013-10-20 Thread janI
On 19 October 2013 19:20, Kay Schenk  wrote:

> On Fri, Oct 18, 2013 at 7:52 AM, Andre Fischer  wrote:
>
> > On 18.10.2013 15:58, janI wrote:
> >
> >> On 18 October 2013 15:00, Andre Fischer  wrote:
> >>
> >>  On 18.10.2013 14:02, janI wrote:
> >>>
> >>>  sd
> 
> 
>  On 18 October 2013 13:36, Andre Fischer  wrote:
> 
>    On 18.10.2013 11:32, janI wrote:
> 
> >   Hi.
> >
> >> due to the discussion in thread "Mentor a new build system", I have
> >> made a
> >> proposal for a central Makefile located in main.
> >>
> >>   Hi Jan,
> >>
> > it is great that you are going to improve this part of the build
> > system.
> >But I think that we need more details about how the proposed build
> > system
> > works.  Without them I can not really evaluate the proposal.
> >
> >   First of all, I agree with juergens remarks that this should be
> >
>  discussed
>  before implemented, hence the wiki page.
> 
>  Secondly this has nothing directly to do with the proposed build
> system,
>  its a simple replacement of build.pl in the current system.
> 
>   Yes, that is how I understood it.  I just did not know how to call
> the
> >>> build.pl replacement.
> >>>
> >>>
> >>>
> >>>  I know that build.pl works, but having a Makefile in main, would make
>  us
>  one step closer on being compatible with the distros. To me this job
> is
>  a
>  simple cleanup, not something we deadly need, but nice to have.
> 
> 
>    Some remarks regarding the missing options:
> 
> > --from 
> >  This is one of the more important options and one that I use
> > frequently
> > (also in the form --all:).
> >  Note that if you are in  and call 'make --from
> '
> > then
> > all modules are built
> >  a) which  depends on
> >  b) but not those that  depends on
> >  c) Both  and  are built.
> >
> >   I have changed the documentation.
> >
>  I use the --all: myself very often, and have changed the
>  documentation, because it is of course supported.
> 
>  The difference is that you do the call in main, but that is a minor
>  detail
>  that can be easily corrected (have /Makefile calling
>  main/Makefile.
> 
>  I have also changed documentation on --html due to juergens comments.
> 
>   I am not sure that we understand --from and --since in the same way
> so
> >>> I
> >>> will try to explain what I think they do.
> >>>
> >>> Let's imagine that we have a simple project with modules A, B, C, D and
> >>> E.
> >>> where B depends on A, C on B, D on C, and E on D.
> >>> A ' make all' would mean 'make E'.  The dependencies would then lead to
> >>> building modules A, B, C, D, E in this order.
> >>> If I am in E and call 'make --from C' then only C, D, and E should be
> >>> built.  A 'make --since C' would only build D and E.
> >>>
> >>> If I am in D and call 'make --from B' then modules B, C, and D are
> built.
> >>>   Call 'make --since B' to build only C and D.
> >>> Note that 'make --from' accepts more than one module name (while 'make
> >>> --all:' does not).
> >>> Note also that in the above case (stand in D, call 'make --from B')
> >>> module
> >>> A is not built, regardless of whether there are changes in A or not.
> >>>   Whereas a simple call to make (still standing in D) would build all
> >>> modules that D depends on, directly or indirectly.  Thus the options
> >>> '--from' and '--since' exist to actively exclude modules from being
> >>> built.
> >>>
> >>> The whole thing becomes a little bit more complicated with multiple
> >>> options to '--from' (I never use '--since' and also don't know a valid
> >>> use
> >>> case so I will ignore it for now) and more complex dependencies then in
> >>> the
> >>> simple example above.  Let's say that if we stand in instsetoo_native
> and
> >>> call 'make --from svx sfx2'.  Note that svx depends on sfx2.  This
> would
> >>> build svx, sfx2 and all modules that depend (directly or indirectly) on
> >>> svx
> >>> OR sfx2.
> >>>
> >>>  got it, now I just have one problem, why would you not build the
> >> dependent
> >> modules, if they needed to be built, thats a scenario I dont understand.
> >> With a central makefile, /makefile will not be called so we do
> not
> >> waste cpu cycles.
> >>
> >> With the .done files, we know when a module was last built and all
> modules
> >> that depend it should be rebuilt which the rule
> >> .done : .done
> >>
> >> will ensure, so If we have A -> B -> C -> D
> >>
> >> I go in B, and call make, then when I go in D and make, B,C,D will be
> >> made.
> >>
> >> If we have A -> B -> D   C -> D
> >> and do the same then only D will be made.
> >>
> >> So --from is not really saving anything ?
> >>
> >
> > a) In your example you first go into B then, in a second step, into D.
> >  The '--from' option lets you do the same (well, no

Re: [proposal] replace build.pl with a central Makefile.

2013-10-19 Thread Kay Schenk
On Fri, Oct 18, 2013 at 7:52 AM, Andre Fischer  wrote:

> On 18.10.2013 15:58, janI wrote:
>
>> On 18 October 2013 15:00, Andre Fischer  wrote:
>>
>>  On 18.10.2013 14:02, janI wrote:
>>>
>>>  sd


 On 18 October 2013 13:36, Andre Fischer  wrote:

   On 18.10.2013 11:32, janI wrote:

>   Hi.
>
>> due to the discussion in thread "Mentor a new build system", I have
>> made a
>> proposal for a central Makefile located in main.
>>
>>   Hi Jan,
>>
> it is great that you are going to improve this part of the build
> system.
>But I think that we need more details about how the proposed build
> system
> works.  Without them I can not really evaluate the proposal.
>
>   First of all, I agree with juergens remarks that this should be
>
 discussed
 before implemented, hence the wiki page.

 Secondly this has nothing directly to do with the proposed build system,
 its a simple replacement of build.pl in the current system.

  Yes, that is how I understood it.  I just did not know how to call the
>>> build.pl replacement.
>>>
>>>
>>>
>>>  I know that build.pl works, but having a Makefile in main, would make
 us
 one step closer on being compatible with the distros. To me this job is
 a
 simple cleanup, not something we deadly need, but nice to have.


   Some remarks regarding the missing options:

> --from 
>  This is one of the more important options and one that I use
> frequently
> (also in the form --all:).
>  Note that if you are in  and call 'make --from '
> then
> all modules are built
>  a) which  depends on
>  b) but not those that  depends on
>  c) Both  and  are built.
>
>   I have changed the documentation.
>
 I use the --all: myself very often, and have changed the
 documentation, because it is of course supported.

 The difference is that you do the call in main, but that is a minor
 detail
 that can be easily corrected (have /Makefile calling
 main/Makefile.

 I have also changed documentation on --html due to juergens comments.

  I am not sure that we understand --from and --since in the same way so
>>> I
>>> will try to explain what I think they do.
>>>
>>> Let's imagine that we have a simple project with modules A, B, C, D and
>>> E.
>>> where B depends on A, C on B, D on C, and E on D.
>>> A ' make all' would mean 'make E'.  The dependencies would then lead to
>>> building modules A, B, C, D, E in this order.
>>> If I am in E and call 'make --from C' then only C, D, and E should be
>>> built.  A 'make --since C' would only build D and E.
>>>
>>> If I am in D and call 'make --from B' then modules B, C, and D are built.
>>>   Call 'make --since B' to build only C and D.
>>> Note that 'make --from' accepts more than one module name (while 'make
>>> --all:' does not).
>>> Note also that in the above case (stand in D, call 'make --from B')
>>> module
>>> A is not built, regardless of whether there are changes in A or not.
>>>   Whereas a simple call to make (still standing in D) would build all
>>> modules that D depends on, directly or indirectly.  Thus the options
>>> '--from' and '--since' exist to actively exclude modules from being
>>> built.
>>>
>>> The whole thing becomes a little bit more complicated with multiple
>>> options to '--from' (I never use '--since' and also don't know a valid
>>> use
>>> case so I will ignore it for now) and more complex dependencies then in
>>> the
>>> simple example above.  Let's say that if we stand in instsetoo_native and
>>> call 'make --from svx sfx2'.  Note that svx depends on sfx2.  This would
>>> build svx, sfx2 and all modules that depend (directly or indirectly) on
>>> svx
>>> OR sfx2.
>>>
>>>  got it, now I just have one problem, why would you not build the
>> dependent
>> modules, if they needed to be built, thats a scenario I dont understand.
>> With a central makefile, /makefile will not be called so we do not
>> waste cpu cycles.
>>
>> With the .done files, we know when a module was last built and all modules
>> that depend it should be rebuilt which the rule
>> .done : .done
>>
>> will ensure, so If we have A -> B -> C -> D
>>
>> I go in B, and call make, then when I go in D and make, B,C,D will be
>> made.
>>
>> If we have A -> B -> D   C -> D
>> and do the same then only D will be made.
>>
>> So --from is not really saving anything ?
>>
>
> a) In your example you first go into B then, in a second step, into D.
>  The '--from' option lets you do the same (well, not really the same, but
> see below) just from D.
>
> b) You go first to B and call make.  This makes A, if necessary, then B.
>  The making of A is exactly the thing that you want to prevent with the
> '--from' option.  Go into D and call 'make --from B'.  A is not built.
>
> c) After the discussion with you I am not sure if we

Re: [proposal] replace build.pl with a central Makefile.

2013-10-18 Thread janI
On 18 October 2013 16:52, Andre Fischer  wrote:

> On 18.10.2013 15:58, janI wrote:
>
>> On 18 October 2013 15:00, Andre Fischer  wrote:
>>
>>  On 18.10.2013 14:02, janI wrote:
>>>
>>>  sd


 On 18 October 2013 13:36, Andre Fischer  wrote:

   On 18.10.2013 11:32, janI wrote:

>   Hi.
>
>> due to the discussion in thread "Mentor a new build system", I have
>> made a
>> proposal for a central Makefile located in main.
>>
>>   Hi Jan,
>>
> it is great that you are going to improve this part of the build
> system.
>But I think that we need more details about how the proposed build
> system
> works.  Without them I can not really evaluate the proposal.
>
>   First of all, I agree with juergens remarks that this should be
>
 discussed
 before implemented, hence the wiki page.

 Secondly this has nothing directly to do with the proposed build system,
 its a simple replacement of build.pl in the current system.

  Yes, that is how I understood it.  I just did not know how to call the
>>> build.pl replacement.
>>>
>>>
>>>
>>>  I know that build.pl works, but having a Makefile in main, would make
 us
 one step closer on being compatible with the distros. To me this job is
 a
 simple cleanup, not something we deadly need, but nice to have.


   Some remarks regarding the missing options:

> --from 
>  This is one of the more important options and one that I use
> frequently
> (also in the form --all:).
>  Note that if you are in  and call 'make --from '
> then
> all modules are built
>  a) which  depends on
>  b) but not those that  depends on
>  c) Both  and  are built.
>
>   I have changed the documentation.
>
 I use the --all: myself very often, and have changed the
 documentation, because it is of course supported.

 The difference is that you do the call in main, but that is a minor
 detail
 that can be easily corrected (have /Makefile calling
 main/Makefile.

 I have also changed documentation on --html due to juergens comments.

  I am not sure that we understand --from and --since in the same way so
>>> I
>>> will try to explain what I think they do.
>>>
>>> Let's imagine that we have a simple project with modules A, B, C, D and
>>> E.
>>> where B depends on A, C on B, D on C, and E on D.
>>> A ' make all' would mean 'make E'.  The dependencies would then lead to
>>> building modules A, B, C, D, E in this order.
>>> If I am in E and call 'make --from C' then only C, D, and E should be
>>> built.  A 'make --since C' would only build D and E.
>>>
>>> If I am in D and call 'make --from B' then modules B, C, and D are built.
>>>   Call 'make --since B' to build only C and D.
>>> Note that 'make --from' accepts more than one module name (while 'make
>>> --all:' does not).
>>> Note also that in the above case (stand in D, call 'make --from B')
>>> module
>>> A is not built, regardless of whether there are changes in A or not.
>>>   Whereas a simple call to make (still standing in D) would build all
>>> modules that D depends on, directly or indirectly.  Thus the options
>>> '--from' and '--since' exist to actively exclude modules from being
>>> built.
>>>
>>> The whole thing becomes a little bit more complicated with multiple
>>> options to '--from' (I never use '--since' and also don't know a valid
>>> use
>>> case so I will ignore it for now) and more complex dependencies then in
>>> the
>>> simple example above.  Let's say that if we stand in instsetoo_native and
>>> call 'make --from svx sfx2'.  Note that svx depends on sfx2.  This would
>>> build svx, sfx2 and all modules that depend (directly or indirectly) on
>>> svx
>>> OR sfx2.
>>>
>>>  got it, now I just have one problem, why would you not build the
>> dependent
>> modules, if they needed to be built, thats a scenario I dont understand.
>> With a central makefile, /makefile will not be called so we do not
>> waste cpu cycles.
>>
>> With the .done files, we know when a module was last built and all modules
>> that depend it should be rebuilt which the rule
>> .done : .done
>>
>> will ensure, so If we have A -> B -> C -> D
>>
>> I go in B, and call make, then when I go in D and make, B,C,D will be
>> made.
>>
>> If we have A -> B -> D   C -> D
>> and do the same then only D will be made.
>>
>> So --from is not really saving anything ?
>>
>
> a) In your example you first go into B then, in a second step, into D.
>  The '--from' option lets you do the same (well, not really the same, but
> see below) just from D.
>
> b) You go first to B and call make.  This makes A, if necessary, then B.
>  The making of A is exactly the thing that you want to prevent with the
> '--from' option.  Go into D and call 'make --from B'.  A is not built.
>

Actually I go to main and say "make D", that will cause B bu

Re: [proposal] replace build.pl with a central Makefile.

2013-10-18 Thread Andre Fischer

On 18.10.2013 15:58, janI wrote:

On 18 October 2013 15:00, Andre Fischer  wrote:


On 18.10.2013 14:02, janI wrote:


sd


On 18 October 2013 13:36, Andre Fischer  wrote:

  On 18.10.2013 11:32, janI wrote:

  Hi.

due to the discussion in thread "Mentor a new build system", I have
made a
proposal for a central Makefile located in main.

  Hi Jan,

it is great that you are going to improve this part of the build system.
   But I think that we need more details about how the proposed build
system
works.  Without them I can not really evaluate the proposal.

  First of all, I agree with juergens remarks that this should be

discussed
before implemented, hence the wiki page.

Secondly this has nothing directly to do with the proposed build system,
its a simple replacement of build.pl in the current system.


Yes, that is how I understood it.  I just did not know how to call the
build.pl replacement.




I know that build.pl works, but having a Makefile in main, would make us
one step closer on being compatible with the distros. To me this job is a
simple cleanup, not something we deadly need, but nice to have.


  Some remarks regarding the missing options:

--from 
 This is one of the more important options and one that I use
frequently
(also in the form --all:).
 Note that if you are in  and call 'make --from '
then
all modules are built
 a) which  depends on
 b) but not those that  depends on
 c) Both  and  are built.

  I have changed the documentation.

I use the --all: myself very often, and have changed the
documentation, because it is of course supported.

The difference is that you do the call in main, but that is a minor detail
that can be easily corrected (have /Makefile calling
main/Makefile.

I have also changed documentation on --html due to juergens comments.


I am not sure that we understand --from and --since in the same way so I
will try to explain what I think they do.

Let's imagine that we have a simple project with modules A, B, C, D and E.
where B depends on A, C on B, D on C, and E on D.
A ' make all' would mean 'make E'.  The dependencies would then lead to
building modules A, B, C, D, E in this order.
If I am in E and call 'make --from C' then only C, D, and E should be
built.  A 'make --since C' would only build D and E.

If I am in D and call 'make --from B' then modules B, C, and D are built.
  Call 'make --since B' to build only C and D.
Note that 'make --from' accepts more than one module name (while 'make
--all:' does not).
Note also that in the above case (stand in D, call 'make --from B') module
A is not built, regardless of whether there are changes in A or not.
  Whereas a simple call to make (still standing in D) would build all
modules that D depends on, directly or indirectly.  Thus the options
'--from' and '--since' exist to actively exclude modules from being built.

The whole thing becomes a little bit more complicated with multiple
options to '--from' (I never use '--since' and also don't know a valid use
case so I will ignore it for now) and more complex dependencies then in the
simple example above.  Let's say that if we stand in instsetoo_native and
call 'make --from svx sfx2'.  Note that svx depends on sfx2.  This would
build svx, sfx2 and all modules that depend (directly or indirectly) on svx
OR sfx2.


got it, now I just have one problem, why would you not build the dependent
modules, if they needed to be built, thats a scenario I dont understand.
With a central makefile, /makefile will not be called so we do not
waste cpu cycles.

With the .done files, we know when a module was last built and all modules
that depend it should be rebuilt which the rule
.done : .done

will ensure, so If we have A -> B -> C -> D

I go in B, and call make, then when I go in D and make, B,C,D will be made.

If we have A -> B -> D   C -> D
and do the same then only D will be made.

So --from is not really saving anything ?


a) In your example you first go into B then, in a second step, into D.  
The '--from' option lets you do the same (well, not really the same, but 
see below) just from D.


b) You go first to B and call make.  This makes A, if necessary, then 
B.  The making of A is exactly the thing that you want to prevent with 
the '--from' option.  Go into D and call 'make --from B'.  A is not built.


c) After the discussion with you I am not sure if we still need --from 
because the two reasons I know for its existence my not be relevant with 
the new approach.


c1) With the '--from' option you can tweak the dependency rules at 
runtime (a bit).  This allows you to exclude projects from being built 
when you know that that is not necessary.  But from experience I know 
that can lead to very subtle errors.  Letting the system determine what 
to built is usually more reliable.


c2) With build.pl a 'build --all' still builds every module on which the 
one you are standing in depends on.  When those modules have been built 
previously, then no compila

Re: [proposal] replace build.pl with a central Makefile.

2013-10-18 Thread janI
On 18 October 2013 15:00, Andre Fischer  wrote:

> On 18.10.2013 14:02, janI wrote:
>
>> sd
>>
>>
>> On 18 October 2013 13:36, Andre Fischer  wrote:
>>
>>  On 18.10.2013 11:32, janI wrote:
>>>
>>>  Hi.

 due to the discussion in thread "Mentor a new build system", I have
 made a
 proposal for a central Makefile located in main.

  Hi Jan,
>>>
>>> it is great that you are going to improve this part of the build system.
>>>   But I think that we need more details about how the proposed build
>>> system
>>> works.  Without them I can not really evaluate the proposal.
>>>
>>>  First of all, I agree with juergens remarks that this should be
>> discussed
>> before implemented, hence the wiki page.
>>
>> Secondly this has nothing directly to do with the proposed build system,
>> its a simple replacement of build.pl in the current system.
>>
>
> Yes, that is how I understood it.  I just did not know how to call the
> build.pl replacement.
>
>
>
>> I know that build.pl works, but having a Makefile in main, would make us
>> one step closer on being compatible with the distros. To me this job is a
>> simple cleanup, not something we deadly need, but nice to have.
>>
>>
>>  Some remarks regarding the missing options:
>>>
>>> --from 
>>> This is one of the more important options and one that I use
>>> frequently
>>> (also in the form --all:).
>>> Note that if you are in  and call 'make --from '
>>> then
>>> all modules are built
>>> a) which  depends on
>>> b) but not those that  depends on
>>> c) Both  and  are built.
>>>
>>>  I have changed the documentation.
>>
>> I use the --all: myself very often, and have changed the
>> documentation, because it is of course supported.
>>
>> The difference is that you do the call in main, but that is a minor detail
>> that can be easily corrected (have /Makefile calling
>> main/Makefile.
>>
>> I have also changed documentation on --html due to juergens comments.
>>
>
> I am not sure that we understand --from and --since in the same way so I
> will try to explain what I think they do.
>
> Let's imagine that we have a simple project with modules A, B, C, D and E.
> where B depends on A, C on B, D on C, and E on D.
> A ' make all' would mean 'make E'.  The dependencies would then lead to
> building modules A, B, C, D, E in this order.
> If I am in E and call 'make --from C' then only C, D, and E should be
> built.  A 'make --since C' would only build D and E.
>
> If I am in D and call 'make --from B' then modules B, C, and D are built.
>  Call 'make --since B' to build only C and D.
> Note that 'make --from' accepts more than one module name (while 'make
> --all:' does not).
> Note also that in the above case (stand in D, call 'make --from B') module
> A is not built, regardless of whether there are changes in A or not.
>  Whereas a simple call to make (still standing in D) would build all
> modules that D depends on, directly or indirectly.  Thus the options
> '--from' and '--since' exist to actively exclude modules from being built.
>
> The whole thing becomes a little bit more complicated with multiple
> options to '--from' (I never use '--since' and also don't know a valid use
> case so I will ignore it for now) and more complex dependencies then in the
> simple example above.  Let's say that if we stand in instsetoo_native and
> call 'make --from svx sfx2'.  Note that svx depends on sfx2.  This would
> build svx, sfx2 and all modules that depend (directly or indirectly) on svx
> OR sfx2.
>

got it, now I just have one problem, why would you not build the dependent
modules, if they needed to be built, thats a scenario I dont understand.
With a central makefile, /makefile will not be called so we do not
waste cpu cycles.

With the .done files, we know when a module was last built and all modules
that depend it should be rebuilt which the rule
.done : .done

will ensure, so If we have A -> B -> C -> D

I go in B, and call make, then when I go in D and make, B,C,D will be made.

If we have A -> B -> D   C -> D
and do the same then only D will be made.

So --from is not really saving anything ?


>
> While this is easy to do with eg Perl I am not sure how to handle this
> with just a Makefile.  The straightforward approach with handling
> .done files does not work.  And that is one of the reasons why I
> don't think that (GNU) makefiles are a good solution for any problem.  Most
> of us are used to program object oriented/imperative.  Makefiles require a
> declarative approach. Maybe the use of Perl is not such a bad idea.  Maybe
> it would be better to reimplement build.pl with a lot fewer options and
> with better readable code.
>

I agree that makefiles are nowhere near a good solution to many of these
problems, but its like windows, I dont like it, but everybody uses it.

We could easily write a new build.pl, that also took care of the local
makefiles, but our build system would not be in the mainstream, and e.g.
the distros would not 

Re: [proposal] replace build.pl with a central Makefile.

2013-10-18 Thread Andre Fischer

On 18.10.2013 14:02, janI wrote:

sd


On 18 October 2013 13:36, Andre Fischer  wrote:


On 18.10.2013 11:32, janI wrote:


Hi.

due to the discussion in thread "Mentor a new build system", I have made a
proposal for a central Makefile located in main.


Hi Jan,

it is great that you are going to improve this part of the build system.
  But I think that we need more details about how the proposed build system
works.  Without them I can not really evaluate the proposal.


First of all, I agree with juergens remarks that this should be discussed
before implemented, hence the wiki page.

Secondly this has nothing directly to do with the proposed build system,
its a simple replacement of build.pl in the current system.


Yes, that is how I understood it.  I just did not know how to call the 
build.pl replacement.




I know that build.pl works, but having a Makefile in main, would make us
one step closer on being compatible with the distros. To me this job is a
simple cleanup, not something we deadly need, but nice to have.



Some remarks regarding the missing options:

--from 
This is one of the more important options and one that I use frequently
(also in the form --all:).
Note that if you are in  and call 'make --from ' then
all modules are built
a) which  depends on
b) but not those that  depends on
c) Both  and  are built.


I have changed the documentation.

I use the --all: myself very often, and have changed the
documentation, because it is of course supported.

The difference is that you do the call in main, but that is a minor detail
that can be easily corrected (have /Makefile calling main/Makefile.

I have also changed documentation on --html due to juergens comments.


I am not sure that we understand --from and --since in the same way so I 
will try to explain what I think they do.


Let's imagine that we have a simple project with modules A, B, C, D and 
E. where B depends on A, C on B, D on C, and E on D.
A ' make all' would mean 'make E'.  The dependencies would then lead to 
building modules A, B, C, D, E in this order.
If I am in E and call 'make --from C' then only C, D, and E should be 
built.  A 'make --since C' would only build D and E.


If I am in D and call 'make --from B' then modules B, C, and D are 
built.  Call 'make --since B' to build only C and D.
Note that 'make --from' accepts more than one module name (while 'make 
--all:' does not).
Note also that in the above case (stand in D, call 'make --from B') 
module A is not built, regardless of whether there are changes in A or 
not.  Whereas a simple call to make (still standing in D) would build 
all modules that D depends on, directly or indirectly.  Thus the options 
'--from' and '--since' exist to actively exclude modules from being built.


The whole thing becomes a little bit more complicated with multiple 
options to '--from' (I never use '--since' and also don't know a valid 
use case so I will ignore it for now) and more complex dependencies then 
in the simple example above.  Let's say that if we stand in 
instsetoo_native and call 'make --from svx sfx2'.  Note that svx depends 
on sfx2.  This would build svx, sfx2 and all modules that depend 
(directly or indirectly) on svx OR sfx2.


While this is easy to do with eg Perl I am not sure how to handle this 
with just a Makefile.  The straightforward approach with handling 
.done files does not work.  And that is one of the reasons why I 
don't think that (GNU) makefiles are a good solution for any problem.  
Most of us are used to program object oriented/imperative.  Makefiles 
require a declarative approach. Maybe the use of Perl is not such a bad 
idea.  Maybe it would be better to reimplement build.pl with a lot fewer 
options and with better readable code.


-Andre





--prepare
Also one option that is important for our every day work.  Use case:
You make changes in  and are not sure if these changes are
compatible/incompatible.  To be on the safe side you discard the output of
all depending modules.  To save time you keep the output of all other
modules.

Often used together with '--from' like 'make --prepare --from svx' to
prepare a build after making changes in svx.


Documentation changed, funny thing is that svx does not clear correctly on
my ubuntu build.



--since 
A variant of '--from'.  The only difference is that  itself is
not built.

If your proposed approach is similar to what my script produces then it
is not too difficult to support --from/--since.  I made some experiments in
this direction but was to lazy to finish them.


My approach is very similar, but I failed to see how --since is supported.
And question is if its real important.



--job
--pre_job
--post_job
   These are sometimes handy to run a non-standard command for all modules.


I have added them, they are by the way a good example why we need a
discussion I have never used them.

However maybe the real discussion is "do we want to replace build and h

Re: [proposal] replace build.pl with a central Makefile.

2013-10-18 Thread janI
sd


On 18 October 2013 13:36, Andre Fischer  wrote:

> On 18.10.2013 11:32, janI wrote:
>
>> Hi.
>>
>> due to the discussion in thread "Mentor a new build system", I have made a
>> proposal for a central Makefile located in main.
>>
> Hi Jan,
>
> it is great that you are going to improve this part of the build system.
>  But I think that we need more details about how the proposed build system
> works.  Without them I can not really evaluate the proposal.
>

First of all, I agree with juergens remarks that this should be discussed
before implemented, hence the wiki page.

Secondly this has nothing directly to do with the proposed build system,
its a simple replacement of build.pl in the current system.

I know that build.pl works, but having a Makefile in main, would make us
one step closer on being compatible with the distros. To me this job is a
simple cleanup, not something we deadly need, but nice to have.


>
> Some remarks regarding the missing options:
>
> --from 
>This is one of the more important options and one that I use frequently
> (also in the form --all:).
>Note that if you are in  and call 'make --from ' then
> all modules are built
>a) which  depends on
>b) but not those that  depends on
>c) Both  and  are built.
>

I have changed the documentation.

I use the --all: myself very often, and have changed the
documentation, because it is of course supported.

The difference is that you do the call in main, but that is a minor detail
that can be easily corrected (have /Makefile calling main/Makefile.

I have also changed documentation on --html due to juergens comments.


> --prepare
>Also one option that is important for our every day work.  Use case:
> You make changes in  and are not sure if these changes are
> compatible/incompatible.  To be on the safe side you discard the output of
> all depending modules.  To save time you keep the output of all other
> modules.
>
>Often used together with '--from' like 'make --prepare --from svx' to
> prepare a build after making changes in svx.
>

Documentation changed, funny thing is that svx does not clear correctly on
my ubuntu build.


>
> --since 
>A variant of '--from'.  The only difference is that  itself is
> not built.
>
>If your proposed approach is similar to what my script produces then it
> is not too difficult to support --from/--since.  I made some experiments in
> this direction but was to lazy to finish them.
>

My approach is very similar, but I failed to see how --since is supported.
And question is if its real important.


>
> --job
> --pre_job
> --post_job
>   These are sometimes handy to run a non-standard command for all modules.
>

I have added them, they are by the way a good example why we need a
discussion I have never used them.

However maybe the real discussion is "do we want to replace build and have
a main/Makefile instead?"



>
> - I have not used the rest of the unsupported options and would not miss
> them.  Others may have other sets of options that are important to them.
>
>
> Some general remarks:
>
> - Why keep one makefile per module?  Why not put all the inter-module
> dependencies into one file (like my script does)?
>

Ups, I did not explain that correctly, I propose 1 Makefile "main/Makefile"
with all inter-module and 1 Makefile "/Makefile" that today just
will call the old makefiles as described in prj/build.lst

- Why not use the oportunity to move (a part of) the build environment out
> of the way to, say, build/ ?
>
You have guessed my next step.


>
> - How are dependencies between modules handled (just the manual
> dependencies from prj/build.lst or also the file dependencies introduced by
> gmake).
>

See doc. on --from. Its done with .done files


> - How is the output of the individual calls to dmake or GNU make
> handled/made accessible.  Ie. if there is a build error, how can I look up
> the corresponding build output?
>

see doc. script make_log

>
> - Are the gmake makefiles included (run in the same process) or is GNU
> make started for them it its own process?
>

For a start they would be called (own process), but its something where I
have no strong opinions.

Please (just to be sure), this proposal has nothing to do with the students
work, its simply because I saw a positive discussion on removing build.pl,
and spent a couple of hours looking at it. If there is a preference not to
remove build.pl I will simply forget it.

rgds
jan I.




>
>
> Regards,
> Andre
>
>
>
>> It has been roughly tested it, thanks to a clever utility from andre.
>>
>> As discussed build.pl contains a lot of options, which need to be
>> considered in a makefile.
>>
>> My suggestion is on
>> http://wiki.openoffice.org/**wiki/Build_System_Analysis:**
>> build.pl_versus_makefile
>>
>> Please feel free to edit/comment on the page. I have reduced to options a
>> lot, and some of them might be in use.
>>
>>

Re: [proposal] replace build.pl with a central Makefile.

2013-10-18 Thread Andre Fischer

On 18.10.2013 11:32, janI wrote:

Hi.

due to the discussion in thread "Mentor a new build system", I have made a
proposal for a central Makefile located in main.


One thing that I forgot earlier:

Can you state the problems with build.pl that you are addressing and how 
the new approach does better?


-Andre



It has been roughly tested it, thanks to a clever utility from andre.

As discussed build.pl contains a lot of options, which need to be
considered in a makefile.

My suggestion is on
http://wiki.openoffice.org/wiki/Build_System_Analysis:build.pl_versus_makefile

Please feel free to edit/comment on the page. I have reduced to options a
lot, and some of them might be in use.

thanks in advance for your comments.




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: [proposal] replace build.pl with a central Makefile.

2013-10-18 Thread Andre Fischer

On 18.10.2013 11:32, janI wrote:

Hi.

due to the discussion in thread "Mentor a new build system", I have made a
proposal for a central Makefile located in main.

Hi Jan,

it is great that you are going to improve this part of the build 
system.  But I think that we need more details about how the proposed 
build system works.  Without them I can not really evaluate the proposal.


Some remarks regarding the missing options:

--from 
   This is one of the more important options and one that I use 
frequently (also in the form --all:).
   Note that if you are in  and call 'make --from ' 
then all modules are built

   a) which  depends on
   b) but not those that  depends on
   c) Both  and  are built.

--prepare
   Also one option that is important for our every day work.  Use case: 
You make changes in  and are not sure if these changes are 
compatible/incompatible.  To be on the safe side you discard the output 
of all depending modules.  To save time you keep the output of all other 
modules.


   Often used together with '--from' like 'make --prepare --from svx' 
to prepare a build after making changes in svx.


--since 
   A variant of '--from'.  The only difference is that  itself 
is not built.


   If your proposed approach is similar to what my script produces then 
it is not too difficult to support --from/--since.  I made some 
experiments in this direction but was to lazy to finish them.


--job
--pre_job
--post_job
  These are sometimes handy to run a non-standard command for all modules.

- I have not used the rest of the unsupported options and would not miss 
them.  Others may have other sets of options that are important to them.



Some general remarks:

- Why keep one makefile per module?  Why not put all the inter-module 
dependencies into one file (like my script does)?
- Why not use the oportunity to move (a part of) the build environment 
out of the way to, say, build/ ?


- How are dependencies between modules handled (just the manual 
dependencies from prj/build.lst or also the file dependencies introduced 
by gmake).
- How is the output of the individual calls to dmake or GNU make 
handled/made accessible.  Ie. if there is a build error, how can I look 
up the corresponding build output?


- Are the gmake makefiles included (run in the same process) or is GNU 
make started for them it its own process?



Regards,
Andre



It has been roughly tested it, thanks to a clever utility from andre.

As discussed build.pl contains a lot of options, which need to be
considered in a makefile.

My suggestion is on
http://wiki.openoffice.org/wiki/Build_System_Analysis:build.pl_versus_makefile

Please feel free to edit/comment on the page. I have reduced to options a
lot, and some of them might be in use.

thanks in advance for your comments.




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: [proposal] replace build.pl with a central Makefile.

2013-10-18 Thread Jürgen Schmidt
On 10/18/13 11:32 AM, janI wrote:
> Hi.
> 
> due to the discussion in thread "Mentor a new build system", I have made a
> proposal for a central Makefile located in main.
> 
> It has been roughly tested it, thanks to a clever utility from andre.
> 
> As discussed build.pl contains a lot of options, which need to be
> considered in a makefile.
> 
> My suggestion is on
> http://wiki.openoffice.org/wiki/Build_System_Analysis:build.pl_versus_makefile
> 
> Please feel free to edit/comment on the page. I have reduced to options a
> lot, and some of them might be in use.
> 
> thanks in advance for your comments.

first of all thanks for your interest to move things forward here. But
keep in mind that it is a very important area and we have to double
check everything before we drop an option ...

For example build --from is an often used option and as long as we have
no "real"dependencies that work properly we need probably something like
this. The html switches should have at least a replacement, we need
something that can be used to for the build bots for example. We have at
least to show an alternative approach to use log files or whatever.


Juergen


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



[proposal] replace build.pl with a central Makefile.

2013-10-18 Thread janI
Hi.

due to the discussion in thread "Mentor a new build system", I have made a
proposal for a central Makefile located in main.

It has been roughly tested it, thanks to a clever utility from andre.

As discussed build.pl contains a lot of options, which need to be
considered in a makefile.

My suggestion is on
http://wiki.openoffice.org/wiki/Build_System_Analysis:build.pl_versus_makefile

Please feel free to edit/comment on the page. I have reduced to options a
lot, and some of them might be in use.

thanks in advance for your comments.