1 # Execute pre-image user config rules.
2 UserBuildConfigRulePreImage ;
4 # Set cd file name and directory defaults and locate the cd file.
5 HAIKU_CD_NAME ?= $(HAIKU_DEFAULT_CD_NAME) ;
6 HAIKU_CD_DIR ?= $(HAIKU_DEFAULT_CD_DIR) ;
7 HAIKU_CD = $(HAIKU_CD_NAME) ;
8 HAIKU_CD_LABEL ?= $(HAIKU_DEFAULT_CD_LABEL) ;
9 MakeLocate $(HAIKU_CD) : $(HAIKU_CD_DIR) ;
11 # prepare the script that initializes the shell variables
12 HAIKU_CD_INIT_VARIABLES_SCRIPT = <HaikuCD>haiku.cd-init-vars ;
13 local script = $(HAIKU_CD_INIT_VARIABLES_SCRIPT) ;
14 MakeLocate $(script) : $(HAIKU_OUTPUT_DIR) ;
17 AddVariableToScript $(script) : sourceDir : $(HAIKU_TOP) ;
18 AddVariableToScript $(script) : outputDir : $(HAIKU_OUTPUT_DIR) ;
19 AddVariableToScript $(script) : tmpDir : $(HAIKU_TMP_DIR) ;
20 AddVariableToScript $(script) : isCD : 1 ;
21 AddVariableToScript $(script) : cdLabel : $(HAIKU_CD_LABEL) ;
22 AddVariableToScript $(script) : addBuildCompatibilityLibDir
23 : $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ;
24 AddTargetVariableToScript $(script) : <build>addattr ;
25 AddTargetVariableToScript $(script) : <build>copyattr ;
26 AddTargetVariableToScript $(script) : <build>rc ;
27 AddTargetVariableToScript $(script) : <build>resattr ;
28 AddTargetVariableToScript $(script) : <build>unzip ;
29 AddTargetVariableToScript $(script) : <build>generate_attribute_stores ;
30 if $(HOST_RM_ATTRS_TARGET) {
31 AddTargetVariableToScript $(script) : $(HOST_RM_ATTRS_TARGET) : rmAttrs ;
33 AddVariableToScript $(script) : rmAttrs : rm ;
36 AddPackagesAndRepositoryVariablesToContainerScript $(script)
37 : $(HAIKU_IMAGE_CONTAINER_NAME) ;
39 # Convenience wrapper rule around BuildHaikuCD.
40 rule _BuildHaikuCD haikuCD : bootFloppy
42 # _BuildHaikuCD <cd target> : <bootFloppy> ;
46 # HAIKU_IMAGE_EARLY_USER_SCRIPTS, HAIKU_IMAGE_LATE_USER_SCRIPTS can be
47 # specified by the user.
48 BuildHaikuCD $(haikuCD) : $(bootFloppy) :
49 $(HAIKU_CD_INIT_VARIABLES_SCRIPT)
50 $(HAIKU_IMAGE_EARLY_USER_SCRIPTS)
51 $(HAIKU_IMAGE_MAKE_DIRS_SCRIPT)
52 $(HAIKU_IMAGE_COPY_FILES_SCRIPT)
53 $(HAIKU_IMAGE_EXTRACT_FILES_SCRIPT)
54 $(HAIKU_IMAGE_LATE_USER_SCRIPTS)
57 # remove the scripts we have generated
59 $(HAIKU_CD_INIT_VARIABLES_SCRIPT)
60 $(HAIKU_IMAGE_MAKE_DIRS_SCRIPT)
61 $(HAIKU_IMAGE_COPY_FILES_SCRIPT)
62 $(HAIKU_IMAGE_EXTRACT_FILES_SCRIPT)
67 _BuildHaikuCD $(HAIKU_CD) : $(HAIKU_BOOT_FLOPPY) ;
69 Depends haiku-cd : $(HAIKU_CD) ;
71 RmTemps $(HAIKU_CD) : $(HAIKU_BOOT_FLOPPY) ;
73 # Execute post-image user config rules.
74 UserBuildConfigRulePostImage ;