List Info

Thread: Target "privatebuild" for Buildtool




Target "privatebuild" for Buildtool
country flaguser name
Sweden
2007-04-16 17:19:58
 Fellow friends of code,

after yet another day with unorthodox use of
buildtool.pl, let me propose a slight extension
of its capabilities.

At present the targets in our buildtool are of the
kind "all or nothing". I have now had reason to 
resolve one C code bug and one stubborn automake
issue in two different packages that were not avail-
able in the central repository of LEAF's. Both cases
required me to recompile the code several times,
just to be sure the executables would work on the
intended Bering-uC target. Hence I am now more
convinced than ever before, that it would be of
benefit to have a buildtool target that
compiles only parts of the C code, without pushing
forward to a full package. Like the uses of the
original Buildroot for a uClibc and Busybox setting,
I would like so see a shortcut for transparently
invoking compiler and linker to rebuild specified
object files and thus rebuild the executable, but
then to stop. I am imagining something like a target
"privatebuild" with a use

  ./buildtool.pl privatebuild thisproj northernpart

which would be like doing

   (cd build_dir_of_thisproj;
     make northernpart )

   (( possibly adding:      make 'link-up-again'
     to get the executable.  ))

with CC, LD, and so on initiated for Bering.
A quick analysis of the perl code gives an
impression that slimmed down editions of 

   buildtool::Make::Build
or
   buildtool::Make::Source

would achieve this, but for now both are too
strongly arranged for sourceing _and_ building
_and_ installing to be use as is.

Comments? Avertions? Incouragement? Refutals?
Opinions are desired!

Regards,    Mats E Andersson
 

 


      
_________________________________________________________
Flyger tiden iväg? Fånga dagen med Yahoo! Mails inbyggda
kalender. Dessutom 250 MB gratis, virusscanning och
antispam. Få den på: http://se.mail.yahoo.com


------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
------------------------------------------------------------
------------
leaf-user mailing list: leaf-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user

Support Request -- http://leaf-project.org/


Re: Target "privatebuild" for Buildtool
country flaguser name
Germany
2007-04-18 12:45:31
Hi Mats,

since nobody else has spoken up so far, I'll give it a
shot.

First of all, remember, I'm speaking for nobody but myself
(seems like
in the past, statements of individual developers were
misunderstood as
being the group's point of view).

Then, this kind of discussion is probably suited better for
the
leaf-devel list, which is why I'm cross-posting it to that
list.
If you have an issue with that, contact the list-owner (i.e.
me )

> Hence I am now more
> convinced than ever before, that it would be of
> benefit to have a buildtool target that
> compiles only parts of the C code, without pushing
> forward to a full package.
I think you're misunderstanding what the primary objective
for buildtool
is - it is to be able to automate building packages, with
(hopefully)
consistent results. It's not a platform for development. It
can be used
as that (and I use it for that too), but since it isn't the
primary
objective for buildtool, it is lacking in this area. And it
hasn't
bugged any of the people who regularly build packages enough
to do
something about that.

> I am imagining something like a target
> "privatebuild" with a use
> 
>   ./buildtool.pl privatebuild thisproj northernpart
> 
> which would be like doing
> 
>    (cd build_dir_of_thisproj;
>      make northernpart )
> 
>    (( possibly adding:      make 'link-up-again'
>      to get the executable.  ))
> 
> with CC, LD, and so on initiated for Bering.
Well, the number of people actively working on buildtool is
rather
small, and buildtool was simply meant as a tool to make life
easier (the
people who wrote it were sick of having to build everything
by hand, and
wanted an easy way of recompiling everything without much
manual
intervention, when upgrading to a new uClibc version, for
example), so I
wouldn't hold my breath regarding one of them adding this
feature,
especially since the issue you're seeing hasn't annoyed any
of the
developers enough to do something so far.
So, unless you or somebody else adds the code to buildtool,
these are
the options I see for you to work around the issue:
* Use tools/compileShell.sh to get a shell that has all the
environment
variables set to build by hand (I don't know if it still
works - I
haven't ever used it - but it sounds like it could be just
what you need).
* change your buildtool.mk file to do exactly what you want
- that's how
I compile my sources. Since buildtool.mk is under your
control, you can
do in it whatever you want. The only thing buildtool expects
of you is
that you provide a "source" and a
"build" target - what happens there is
up to you.
If you only want to run "make northernpart" then
make the source target
unpack the sources (as in every other buildtool.mk file) and
have the
build target look like something like this:

$(SOME_DIR)/.build:
    $(MAKE) CCOPT="$(BT_COPT_FLAGS)" -C
$(SOME_DIR) northernpart

build: $(SOME_DIR)/.build

leaving out the "touch  $(SOME_DIR)/.build" part
will mean that you can
run it as often as you like, without buildtool's "all
or nothing"
approach getting in your way.

Sorry - this is probably not the response you wanted to hear
- but I
hope that'll give you something to work with the next time
you run into
some troublesome code that refuses to compile easily (there
are plenty
of those out there...)

Martin

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
------------------------------------------------------------
------------
leaf-user mailing list: leaf-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user

Support Request -- http://leaf-project.org/


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )