[haiku-development] Re: Disable creating an image on the default "build" target

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 07 Jul 2009 03:49:58 +0200

-------- Original-Nachricht --------
> Datum: Mon, 6 Jul 2009 22:15:11 -0300
> Von: "André Braga" <meianoite@xxxxxxxxx>

> After Urias' suggestion of using build profiles I do agree that ticket
> #4068 is easily worked around.
> 
> Still on the build profiles note, how do I prevent the default target
> from creating an image and just build the object files? As it stands
> now the default target of "build" will always create a disk image, and
> given the workflow that Urias suggested this is, if not undesirable
> for low disk space situations, totally superfluous. I could always
> specify /dev/null as the default target, but... No. O_O

There's no pre-furnished solution, but you could create a custom build profile 
and override AddFilesToHaikuImage, when it is used. Should look like this:

DefineBuildProfile all : custom ;

switch $(HAIKU_BUILD_PROFILE) {
        case "all" : {
                NotFile build-all ;
                JAM_TARGETS = build-all ;

                rule AddFilesToHaikuImage subdir : files
                {
                        Depends build-all : $(files) ;
                }
                rule AddBootModuleSymlinksToHaikuImage { }
        }
[...]
}

Untested, but you get the idea...

CU, Ingo

Other related posts: