1338b8dc3SIngo WeinholdSubDir HAIKU_TOP ; 269b97469SIngo Weinhold 3f35b607dSJérôme DuvalNotFile doc_files ; 4f35b607dSJérôme DuvalDepends files : doc_files ; 5f35b607dSJérôme Duval 6f4eb5cf7SMatt Madia# Prepare the optional build features before parsing the Jamfile tree. 7b0944c78SIngo Weinholdlocal architectureObject ; 8b0944c78SIngo Weinholdfor architectureObject in [ MultiArchSubDirSetup ] { 9b0944c78SIngo Weinhold on $(architectureObject) { 10f0cacbb3SIngo Weinhold include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildFeatures ] ; 11b0944c78SIngo Weinhold } 12b0944c78SIngo Weinhold} 13f4eb5cf7SMatt Madia 14*72e67791SOliver Tappe# Include packages that are required by all images: 15271e9484SIngo Weinhold# primary architecture 1678f4c163SIngo WeinholdAddHaikuImagePackages 17*72e67791SOliver Tappe curl freetype icu libsolv zlib 18*72e67791SOliver Tappe ; 19*72e67791SOliver Tappe# secondary architectures 20*72e67791SOliver Tappelocal architectureObject ; 21*72e67791SOliver Tappefor architectureObject 22*72e67791SOliver Tappe in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] { 23*72e67791SOliver Tappe on $(architectureObject) { 24*72e67791SOliver Tappe AddHaikuImagePackages 25*72e67791SOliver Tappe curl freetype icu libsolv zlib 26*72e67791SOliver Tappe ; 27*72e67791SOliver Tappe } 28*72e67791SOliver Tappe} 29*72e67791SOliver Tappe 30*72e67791SOliver Tappe# Include packages that are required by non-basic images: 31*72e67791SOliver Tappeif ! ( $(HAIKU_BOOTSTRAP_BUILD) || $(HAIKU_MINIMUM_BUILD) ) { 32*72e67791SOliver Tappe # primary architecture 33*72e67791SOliver Tappe AddHaikuImagePackages 34*72e67791SOliver Tappe bzip2 ctags ffmpeg findutils gawk glu grep jpeg libpng 35*72e67791SOliver Tappe mesa mesa_devel mesa_swrast sed tar which 3678f4c163SIngo Weinhold ; 37271e9484SIngo Weinhold 38271e9484SIngo Weinhold # secondary architectures 39271e9484SIngo Weinhold local architectureObject ; 40271e9484SIngo Weinhold for architectureObject 41271e9484SIngo Weinhold in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] { 42271e9484SIngo Weinhold on $(architectureObject) { 43271e9484SIngo Weinhold AddHaikuImagePackages 44*72e67791SOliver Tappe ffmpeg glu jpeg libpng mesa 45271e9484SIngo Weinhold ; 46271e9484SIngo Weinhold } 47271e9484SIngo Weinhold } 4878f4c163SIngo Weinhold} 49429618d2SMatt Madia 50429618d2SMatt Madia# If enabled, make sure that OpenSSL is added to the image. 5157190167SIngo Weinholdif [ FIsBuildFeatureEnabled openssl ] { 5298c6dfa4SIngo Weinhold AddHaikuImagePackages openssl ; 53429618d2SMatt Madia} 54a5c31cbbSMatt Madia 5524796718SIngo Weinhold# add additionally requested packages 5624796718SIngo WeinholdAddHaikuImagePackages $(HAIKU_IMAGE_ADDITIONAL_PACKAGES) ; 5724796718SIngo Weinhold 5848d60fa6SIngo Weinhold# Optionally we allow not to include the "src" subdirectory. 5948d60fa6SIngo Weinholdif $(HAIKU_DONT_INCLUDE_SRC) { 6048d60fa6SIngo Weinhold # Don't include "src", but at least include the stuff needed for the 6148d60fa6SIngo Weinhold # build. 6248d60fa6SIngo Weinhold SubInclude HAIKU_TOP src build ; 6348d60fa6SIngo Weinhold SubInclude HAIKU_TOP src tools ; 6448d60fa6SIngo Weinhold} else { 65338b8dc3SIngo Weinhold SubInclude HAIKU_TOP src ; 6648d60fa6SIngo Weinhold} 67a7ec9c1dSFrançois Revolif $(HAIKU_INCLUDE_3RDPARTY) { 68a7ec9c1dSFrançois Revol SubInclude HAIKU_TOP 3rdparty ; 69a7ec9c1dSFrançois Revol} 7048d60fa6SIngo Weinhold 71be8a6e43SIngo Weinhold# Perform deferred SubIncludes. 72be8a6e43SIngo WeinholdExecuteDeferredSubIncludes ; 73be8a6e43SIngo Weinhold 74689e6794SIngo Weinhold# reset subdir 75689e6794SIngo WeinholdSubDir HAIKU_TOP ; 76ad27081fSIngo Weinhold 77ad27081fSIngo Weinhold# Execute post-build-target user config rules. 78ad27081fSIngo WeinholdUserBuildConfigRulePostBuildTargets ; 79689e6794SIngo Weinhold 80be5e6fefSIngo Weinhold# specify the Haiku repository contents 81be5e6fefSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories Haiku ] ; 82be5e6fefSIngo Weinhold 83b39c8d37SIngo Weinhold# specify the Haiku image and network boot archive contents 8478f4c163SIngo Weinholdif $(HAIKU_BOOTSTRAP_BUILD) { 8578f4c163SIngo Weinhold include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImageBootstrap ] ; 86*72e67791SOliver Tappe} else if $(HAIKU_MINIMUM_BUILD) { 87*72e67791SOliver Tappe include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImageMinimum ] ; 8878f4c163SIngo Weinhold} else { 89e8c5236aSIngo Weinhold include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImage ] ; 9078f4c163SIngo Weinhold} 91e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images NetBootArchive ] ; 92e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images FloppyBootImage ] ; 93e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootImage ] ; 94e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootPPCImage ] ; 95e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuCD ] ; 96e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images AnybootImage ] ; 9737aefc9cSIngo Weinhold 9837aefc9cSIngo Weinhold# Check whether all requested optional packages do actually exist. 9937aefc9cSIngo Weinholdlocal package ; 10037aefc9cSIngo Weinholdlocal packageError ; 10137aefc9cSIngo Weinholdfor package in $(HAIKU_ADDED_OPTIONAL_PACKAGES) { 10237aefc9cSIngo Weinhold if ! [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_EXISTS) ] { 10337aefc9cSIngo Weinhold Echo "ERROR: Requested optional package \"$(package)\" does not" 10437aefc9cSIngo Weinhold "exist." ; 10537aefc9cSIngo Weinhold packageError = 1 ; 10637aefc9cSIngo Weinhold } 10737aefc9cSIngo Weinhold} 10837aefc9cSIngo Weinholdif $(packageError) { 10937aefc9cSIngo Weinhold Exit ; 11037aefc9cSIngo Weinhold} 11180ad173eSMatt Madia 11280ad173eSMatt Madia# Pseudo-target to build all targets that are localized. 113a8fcb885SMatt MadiaNotFile LocalizedTargets ; 114a8fcb885SMatt MadiaDepends LocalizedTargets : $(HAIKU_LOCALIZED_TARGETS) ; 1159de5b022SMatt Madia 1169de5b022SMatt MadiaNotFile catalogs ; 1179de5b022SMatt MadiaDepends catalogs : $(HAIKU_LOCALE_CATALOGS) ; 1189de5b022SMatt Madia 1199de5b022SMatt MadiaNotFile catkeys ; 1209de5b022SMatt MadiaDepends catkeys : $(HAIKU_LOCALE_OUTPUT_CATKEYS) ; 121