50ca9a25c9
There should be separate gcc 2 and gcc 4 packages instead. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40827 a95241bf-73f2-0310-859d-f6bbb57e9c96
83 lines
2.7 KiB
Plaintext
83 lines
2.7 KiB
Plaintext
# Execute pre-image user config rules.
|
|
UserBuildConfigRulePreImage ;
|
|
|
|
# Set cd file name and directory defaults and locate the cd file.
|
|
HAIKU_CD_NAME ?= $(HAIKU_DEFAULT_CD_NAME) ;
|
|
HAIKU_CD_DIR ?= $(HAIKU_DEFAULT_CD_DIR) ;
|
|
HAIKU_CD = $(HAIKU_CD_NAME) ;
|
|
HAIKU_CD_LABEL ?= $(HAIKU_DEFAULT_CD_LABEL) ;
|
|
MakeLocate $(HAIKU_CD) : $(HAIKU_CD_DIR) ;
|
|
|
|
# Detect a hybrid GCC2/GCC4 image.
|
|
local isHybridBuild ;
|
|
if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) = 1
|
|
&& $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) {
|
|
isHybridBuild = 1 ;
|
|
}
|
|
|
|
# prepare the script that initializes the shell variables
|
|
HAIKU_CD_INIT_VARIABLES_SCRIPT = <HaikuCD>haiku.cd-init-vars ;
|
|
local script = $(HAIKU_CD_INIT_VARIABLES_SCRIPT) ;
|
|
MakeLocate $(script) : $(HAIKU_OUTPUT_DIR) ;
|
|
Always $(script) ;
|
|
|
|
AddVariableToScript $(script) : sourceDir : $(HAIKU_TOP) ;
|
|
AddVariableToScript $(script) : outputDir : $(HAIKU_OUTPUT_DIR) ;
|
|
AddVariableToScript $(script) : tmpDir : $(HAIKU_TMP_DIR) ;
|
|
AddVariableToScript $(script) : isCD : 1 ;
|
|
AddVariableToScript $(script) : cdLabel : $(HAIKU_CD_LABEL) ;
|
|
AddVariableToScript $(script) : addBuildCompatibilityLibDir
|
|
: $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ;
|
|
AddTargetVariableToScript $(script) : <build>addattr ;
|
|
AddTargetVariableToScript $(script) : <build>copyattr ;
|
|
AddTargetVariableToScript $(script) : <build>rc ;
|
|
AddTargetVariableToScript $(script) : <build>resattr ;
|
|
AddTargetVariableToScript $(script) : <build>unzip ;
|
|
AddTargetVariableToScript $(script) : <build>generate_attribute_stores ;
|
|
if $(HOST_RM_ATTRS_TARGET) {
|
|
AddTargetVariableToScript $(script) : $(HOST_RM_ATTRS_TARGET) : rmAttrs ;
|
|
} else {
|
|
AddVariableToScript $(script) : rmAttrs : rm ;
|
|
}
|
|
if $(optionalPackageDescriptions) {
|
|
AddTargetVariableToScript $(script) : $(optionalPackageDescriptions)
|
|
: optionalPackageDescriptions ;
|
|
}
|
|
|
|
# Convenience wrapper rule around BuildHaikuCD.
|
|
rule _BuildHaikuCD haikuCD : bootFloppy
|
|
{
|
|
# _BuildHaikuCD <cd target> : <bootFloppy> ;
|
|
#
|
|
|
|
# build the cd
|
|
# HAIKU_IMAGE_EARLY_USER_SCRIPTS, HAIKU_IMAGE_LATE_USER_SCRIPTS can be
|
|
# specified by the user.
|
|
BuildHaikuCD $(haikuCD) : $(bootFloppy) :
|
|
$(HAIKU_CD_INIT_VARIABLES_SCRIPT)
|
|
$(HAIKU_IMAGE_EARLY_USER_SCRIPTS)
|
|
$(HAIKU_IMAGE_MAKE_DIRS_SCRIPT)
|
|
$(HAIKU_IMAGE_COPY_FILES_SCRIPT)
|
|
$(HAIKU_IMAGE_EXTRACT_FILES_SCRIPT)
|
|
$(HAIKU_IMAGE_LATE_USER_SCRIPTS)
|
|
;
|
|
|
|
# remove the scripts we have generated
|
|
RmTemps $(haikuCD) :
|
|
$(HAIKU_CD_INIT_VARIABLES_SCRIPT)
|
|
$(HAIKU_IMAGE_MAKE_DIRS_SCRIPT)
|
|
$(HAIKU_IMAGE_COPY_FILES_SCRIPT)
|
|
$(HAIKU_IMAGE_EXTRACT_FILES_SCRIPT)
|
|
;
|
|
}
|
|
|
|
# build the cd
|
|
_BuildHaikuCD $(HAIKU_CD) : $(HAIKU_BOOT_FLOPPY) ;
|
|
NotFile haiku-cd ;
|
|
Depends haiku-cd : $(HAIKU_CD) ;
|
|
|
|
RmTemps $(HAIKU_CD) : $(HAIKU_BOOT_FLOPPY) ;
|
|
|
|
# Execute post-image user config rules.
|
|
UserBuildConfigRulePostImage ;
|