[PATCH] Don't hardcode target dependencies

George Boudreau georgeb at linuxfromscratch.org
Thu Mar 15 13:40:34 PDT 2007

   I have been thinking about Dan's request and have not come up with a 
clean solution that will cover all books.

   When I make the drastic changes to the makefile format the goal was 
size reduction and maintaining the book build style. If I wanted to 
build a particular package multiple times I forced a 'build failure' and 
the makefile would abort. Not a practical work method for the general 

   If you want to abort the makefile after a selected package has been 
built we would need a testing method for a breakpoint variable passed on 
the cmd line.
  make BREAKPOINT=028-binutils-pass1

     @$(call echo_SULUSER_request) 

     @(sudo $(SU_LUSER)
        "source .bashrc && \
                 cd $(MOUNT_PT)/$(SCRIPT_ROOT) &&
                 make BREAKPOINT=$(BREAKPOINT) LUSER"
     @touch $@

028-binutils-pass1: ....
   ifeq ($(BREAKPOINT), $@ )
     abort/die/quit or whatever you desire
   @$(call housekeeping)

   If the breakpoint is tested _before_ the housekeeping the dependency 
flag/file is not created and the package can be rebuilt without 

   However, if you are looking for even more flexibility we could 
beg/borrow/recycle some code from the LiveCD makefile. They have 
implemented a few 'make [package-only]' routines and the same could be 
done for jhalfs.

   Just a few ideas.


More information about the alfs-discuss mailing list