[haiku-commits] r35871 - haiku/trunk/build/jam

  • From: mattmadia@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 16 Mar 2010 00:51:45 +0100 (CET)

Author: mmadia
Date: 2010-03-16 00:51:45 +0100 (Tue, 16 Mar 2010)
New Revision: 35871
Changeset: http://dev.haiku-os.org/changeset/35871/haiku

Modified:
   haiku/trunk/build/jam/AnybootImage
   haiku/trunk/build/jam/BuildSetup
   haiku/trunk/build/jam/MiscRules
   haiku/trunk/build/jam/ReleaseBuildProfiles
Log:
Create "anyboot-image" and define build profile rules to utilize it.


Modified: haiku/trunk/build/jam/AnybootImage
===================================================================
--- haiku/trunk/build/jam/AnybootImage  2010-03-15 21:47:18 UTC (rev 35870)
+++ haiku/trunk/build/jam/AnybootImage  2010-03-15 23:51:45 UTC (rev 35871)
@@ -1,3 +1,9 @@
+# Set anyboot file name and directory defaults.
+HAIKU_ANYBOOT_NAME ?= $(HAIKU_DEFAULT_ANYBOOT_NAME) ;
+HAIKU_ANYBOOT_DIR ?= $(HAIKU_DEFAULT_ANYBOOT_DIR) ;
+HAIKU_ANYBOOT = $(HAIKU_ANYBOOT_NAME) ;
+HAIKU_ANYBOOT_LABEL ?= $(HAIKU_DEFAULT_ANYBOOT_LABEL) ;
+
 rule BuildAnybootMBR binary : source {
        Depends $(binary) : $(source) ;
 
@@ -11,14 +17,6 @@
        $(TARGET_CC) $(MBR_SOURCE) -o $(1) -nostdlib -Xlinker --oformat=binary 
-Xlinker -S -Xlinker -N -Xlinker "-e start" -Xlinker "-Ttext=0x600"
 }
 
-local baseMBR = base_mbr.bin ;
-local mbrSource = [ FDirName $(HAIKU_TOP) src bin writembr mbr.S ] ;
-
-BuildAnybootMBR $(baseMBR) : $(mbrSource) ;
-
-MakeLocate $(baseMBR) : $(HAIKU_OUTPUT_DIR) ;
-
-
 rule BuildAnybootImage anybootImage : mbrPart : isoPart : imageFile {
        local anyboot = <build>anyboot ;
 
@@ -34,14 +32,19 @@
        $(2[1]) $(1) $(2[2]) $(2[3]) $(2[4])
 }
 
-HAIKU_ANYBOOT_IMAGE = haiku-anyboot.image ;
-MakeLocate $(HAIKU_ANYBOOT_IMAGE) : $(HAIKU_OUTPUT_DIR) ;
-
-BuildAnybootImage $(HAIKU_ANYBOOT_IMAGE) : $(baseMBR) : $(HAIKU_CD_BOOT_IMAGE)
+local baseMBR = base_mbr.bin ;
+local mbrSource = [ FDirName $(HAIKU_TOP) src bin writembr mbr.S ] ;
+BuildAnybootMBR $(baseMBR) : $(mbrSource) ;
+MakeLocate $(baseMBR) : $(HAIKU_OUTPUT_DIR) ;
+MakeLocate $(HAIKU_ANYBOOT) : $(HAIKU_ANYBOOT_DIR) ;
+BuildAnybootImage $(HAIKU_ANYBOOT) : $(baseMBR) : $(HAIKU_CD_BOOT_IMAGE)
        : $(HAIKU_IMAGE_NAME) ;
 
 # TODO: this one seems to cause the build to fail each other run (caching?)
-#RmTemps $(HAIKU_ANYBOOT_IMAGE) : $(baseMBR) ;
+#RmTemps $(HAIKU_ANYBOOT) : $(baseMBR) ;
+RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_CD_BOOT_IMAGE) ;
+RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_IMAGE_NAME) ;
+RmTemps $(HAIKU_ANYBOOT) : $(HAIKU_BOOT_FLOPPY) ;
 
 NotFile haiku-anyboot-image ;
-Depends haiku-anyboot-image : $(HAIKU_ANYBOOT_IMAGE) ;
+Depends haiku-anyboot-image : $(HAIKU_ANYBOOT) ;

Modified: haiku/trunk/build/jam/BuildSetup
===================================================================
--- haiku/trunk/build/jam/BuildSetup    2010-03-15 21:47:18 UTC (rev 35870)
+++ haiku/trunk/build/jam/BuildSetup    2010-03-15 23:51:45 UTC (rev 35871)
@@ -73,6 +73,11 @@
 HAIKU_DEFAULT_CD_DIR = $(HAIKU_OUTPUT_DIR) ;
 HAIKU_DEFAULT_CD_LABEL = Haiku ;
 
+# Haiku Anyboot defaults
+HAIKU_DEFAULT_ANYBOOT_NAME = haiku-anyboot.image ;
+HAIKU_DEFAULT_ANYBOOT_DIR = $(HAIKU_OUTPUT_DIR) ;
+HAIKU_DEFAULT_ANYBOOT_LABEL ?= Haiku ;
+
 # analyze and optionally replace jam's target parameters
 ProcessCommandLineArguments ;
 

Modified: haiku/trunk/build/jam/MiscRules
===================================================================
--- haiku/trunk/build/jam/MiscRules     2010-03-15 21:47:18 UTC (rev 35870)
+++ haiku/trunk/build/jam/MiscRules     2010-03-15 23:51:45 UTC (rev 35871)
@@ -326,6 +326,14 @@
        local startOffset ;
 
        switch $(type) {
+               case "anyboot-image" : {
+                       targetName ?= $(HAIKU_ANYBOOT_NAME) ;
+                       targetName ?= $(HAIKU_DEFAULT_ANYBOOT_NAME) ;
+                       HAIKU_ANYBOOT_DIR = $(targetDir) ;
+                       HAIKU_ANYBOOT_NAME = $(targetName) ;
+                       buildTarget = haiku-anyboot-image ;
+               }
+
                case "cd-image" : {
                        targetName ?= $(HAIKU_CD_NAME) ;
                        targetName ?= $(HAIKU_DEFAULT_CD_NAME) ;

Modified: haiku/trunk/build/jam/ReleaseBuildProfiles
===================================================================
--- haiku/trunk/build/jam/ReleaseBuildProfiles  2010-03-15 21:47:18 UTC (rev 
35870)
+++ haiku/trunk/build/jam/ReleaseBuildProfiles  2010-03-15 23:51:45 UTC (rev 
35871)
@@ -1,9 +1,13 @@
 DefineBuildProfile alpha-raw : image : "haiku-alpha.image" ;
 DefineBuildProfile alpha-vmware : vmware-image : "haiku-alpha.vmdk" ;
 DefineBuildProfile alpha-cd : cd-image : "haiku-alpha.iso" ;
+DefineBuildProfile alpha-anyboot : anyboot-image
+       : "haiku-alpha-anyboot.image" ;
 DefineBuildProfile nightly-raw : image : "haiku-nightly.image" ;
 DefineBuildProfile nightly-vmware : vmware-image : "haiku-nightly.vmdk" ;
 DefineBuildProfile nightly-cd : cd-image : "haiku-nightly.iso" ;
+DefineBuildProfile nightly-anyboot : anyboot-image
+       : "haiku-nightly-anyboot.image" ;
 
 switch $(HAIKU_BUILD_PROFILE) {
        case "alpha-*" : {


Other related posts:

  • » [haiku-commits] r35871 - haiku/trunk/build/jam - mattmadia