List Info

Thread: Don't hardcode target dependencies




Don't hardcode target dependencies
user name
2007-03-12 22:44:21
When experimenting with the LFS build, one of the things I
want to do
is make jhalfs stop at specific points. Say, after Ch. 5 or
after a
certain point in Ch. 6. Right now I'm trying to investigate
the ICA
differences in cc1 and cc1plus, so I want to build just up
to Ch. 6
gcc and stop.

Currently this is kind of hard because the dependencies for
the major
targets are hardcoded. For instance:

LUSER:         028-binutils-pass1 029-gcc-pass1
030-linux-headers ...

And with the sudo indirection, it's difficult for me to say
`make
028-binutils-pass1' or something and have it just stop
there. What
would make this easier would be if the dependencies
(028-binutils-pass1, etc.) were in a variable that I could
override:

LUSER_TARGETS = 028-binutils-pass1 ...
LUSER: $(LUSER_TARGETS)

The attached patch tries to do just that. For normal usage,
this will
make no difference since people won't be trying to override
the
variables. But for special cases, this makes things simpler.
I could
be totally wrong about the CUSTOM_TOOLS and BLFS_TOOL
targets. I don't
know how those work.

--
Dan

-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

  
Re: Don't hardcode target dependencies
country flaguser name
Spain
2007-03-16 14:26:46
El Jueves, 15 de Marzo de 2007 23:21, M.Canales.es
escribió:

>    ifeq ($(BREAKPOINT), $ )
>      $(error The build has been stopped at $ as
requested)
>    endif

That don't work. The error is generated at Makefile parser
time, not at target 
build time.

But adding at the end of "define housekeeping"
this other:

if [ "$(BREAKPOINT)" = "$" ]
; then 
     echo The build has been stopped at $ as
requested ; 
     bomb-make-here ; 
fi

seems to work:

/mnt/build_dir/jhalfs$ make BREAKPOINT=021-addinguser
------------------------------------------------------------
--------------------
mk_SETUP
ROOT privilege is required to perform a number commands
sudo will request a password to all high privilege cmds to
execute correctly
make[1]: Entering directory `/mnt/build_dir/jhalfs'
------------------------------------------------------------
--------------------
 Building target 021-addinguser

 Target 021-addinguser OK
------------------------------------------------------------
--------------------
        The build has been stopped at 021-addinguser as
requested
/bin/bash: bomb-make-here: command not found
make[1]: *** [021-addinguser] Error 127
make[1]: Leaving directory `/mnt/build_dir/jhalfs'
make: *** [mk_SETUP] Error 2
macanasandbox:/mnt/build_dir/jhalfs$  

I suppose that there is no "bomb-make-here"
command anywhere.


-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.info
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Don't hardcode target dependencies
country flaguser name
Spain
2007-03-16 14:40:22
El Viernes, 16 de Marzo de 2007 20:35, George Boudreau
escribió:

>
>    no, but if you replace 'bomb-make-here' with 'false'
it will terminate.

Umh, yes, it should. 

Testing it now (the build has been asked to stop on
029-gcc-pass1 thus it will 
take some minutes...).

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.info
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Don't hardcode target dependencies
country flaguser name
Spain
2007-03-16 15:05:39
El Viernes, 16 de Marzo de 2007 20:40, M.Canales.es
escribió:
> El Viernes, 16 de Marzo de 2007 20:35, George Boudreau
escribió:
> >    no, but if you replace 'bomb-make-here' with
'false' it will
> > terminate.
>
> Umh, yes, it should.
>
> Testing it now (the build has been asked to stop on
029-gcc-pass1 thus it
> will take some minutes...).

Yeah, works )

/mnt/build_dir/jhalfs$ make BREAKPOINT=029-gcc-pass1
------------------------------------------------------------
--------------------
mk_LUSER
You are going to log into the user account lfs
sudo requires a password
------------------------------------------------------------
--------------------
 Building target 029-gcc-pass1
 [+++++++++++++++++++++++++++++++++++++++++++++++-          
 ] 25 min. 47 sec
 Target 029-gcc-pass1 OK
------------------------------------------------------------
--------------------
        The build has been stopped at 029-gcc-pass1 as
requested
make: *** [029-gcc-pass1] Error 1
make: *** [mk_LUSER] Error 2
/mnt/build_dir/jhalfs$   

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.info
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Don't hardcode target dependencies
country flaguser name
Spain
2007-03-16 15:25:54
El Viernes, 16 de Marzo de 2007 21:16, George Boudreau
escribió:

>    It is not the a very classy solution but it does the
job. 

Yes, I know. The advantage is that the implementation is
very simple and no 
intrusive.

>    Are you 
> going to make the necessary changes to all the scripts
is this only for
> LFS?

After finished the LFS test build I will port it to all
books and do the 
commit to can review and test it with the rest of books..

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.info
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Don't hardcode target dependencies
country flaguser name
Spain
2007-03-19 13:30:01
El Viernes, 16 de Marzo de 2007 21:25, M.Canales.es
escribió:

>
> After finished the LFS test build I will port it to all
books and do the
> commit to can review and test it with the rest of
books..
>

Done. Looks like it works as expected 

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.info
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

[1-6]

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