2009-02-15 05:34:32 +03:00
|
|
|
# Execute pre-image user config rules.
|
2020-01-26 00:27:48 +03:00
|
|
|
UserBuildConfigRulePreImage ;
|
2009-02-15 05:34:32 +03:00
|
|
|
|
|
|
|
# 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) ;
|
|
|
|
|
|
|
|
# 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) ;
|
2010-04-11 03:14:42 +04:00
|
|
|
AddVariableToScript $(script) : isCD : 1 ;
|
2009-02-15 05:34:32 +03:00
|
|
|
AddVariableToScript $(script) : cdLabel : $(HAIKU_CD_LABEL) ;
|
|
|
|
AddVariableToScript $(script) : addBuildCompatibilityLibDir
|
2019-08-31 00:11:50 +03:00
|
|
|
: "export $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR)" ;
|
2009-02-15 05:34:32 +03:00
|
|
|
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 ;
|
|
|
|
}
|
2013-09-13 02:05:39 +04:00
|
|
|
|
|
|
|
AddPackagesAndRepositoryVariablesToContainerScript $(script)
|
|
|
|
: $(HAIKU_IMAGE_CONTAINER_NAME) ;
|
2009-02-15 05:34:32 +03:00
|
|
|
|
|
|
|
# Convenience wrapper rule around BuildHaikuCD.
|
|
|
|
rule _BuildHaikuCD haikuCD : bootFloppy
|
|
|
|
{
|
|
|
|
# _BuildHaikuCD <cd target> : <bootFloppy> ;
|
|
|
|
#
|
|
|
|
|
|
|
|
# build the cd
|
2009-02-15 16:30:42 +03:00
|
|
|
# HAIKU_IMAGE_EARLY_USER_SCRIPTS, HAIKU_IMAGE_LATE_USER_SCRIPTS can be
|
2009-02-15 05:34:32 +03:00
|
|
|
# specified by the user.
|
|
|
|
BuildHaikuCD $(haikuCD) : $(bootFloppy) :
|
|
|
|
$(HAIKU_CD_INIT_VARIABLES_SCRIPT)
|
2009-02-15 16:30:42 +03:00
|
|
|
$(HAIKU_IMAGE_EARLY_USER_SCRIPTS)
|
|
|
|
$(HAIKU_IMAGE_MAKE_DIRS_SCRIPT)
|
|
|
|
$(HAIKU_IMAGE_COPY_FILES_SCRIPT)
|
2010-02-27 20:48:12 +03:00
|
|
|
$(HAIKU_IMAGE_EXTRACT_FILES_SCRIPT)
|
2009-02-15 16:30:42 +03:00
|
|
|
$(HAIKU_IMAGE_LATE_USER_SCRIPTS)
|
2009-02-15 05:34:32 +03:00
|
|
|
;
|
|
|
|
|
|
|
|
# remove the scripts we have generated
|
|
|
|
RmTemps $(haikuCD) :
|
|
|
|
$(HAIKU_CD_INIT_VARIABLES_SCRIPT)
|
2009-02-15 16:30:42 +03:00
|
|
|
$(HAIKU_IMAGE_MAKE_DIRS_SCRIPT)
|
|
|
|
$(HAIKU_IMAGE_COPY_FILES_SCRIPT)
|
2010-02-27 20:48:12 +03:00
|
|
|
$(HAIKU_IMAGE_EXTRACT_FILES_SCRIPT)
|
2009-02-15 05:34:32 +03:00
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
# build the cd
|
|
|
|
_BuildHaikuCD $(HAIKU_CD) : $(HAIKU_BOOT_FLOPPY) ;
|
|
|
|
NotFile haiku-cd ;
|
|
|
|
Depends haiku-cd : $(HAIKU_CD) ;
|
|
|
|
|
2009-02-15 16:30:42 +03:00
|
|
|
RmTemps $(HAIKU_CD) : $(HAIKU_BOOT_FLOPPY) ;
|
|
|
|
|
2009-02-15 05:34:32 +03:00
|
|
|
# Execute post-image user config rules.
|
|
|
|
UserBuildConfigRulePostImage ;
|