xref: /haiku/Jamfile (revision 2b76973fa2401f7a5edf68e6470f3d3210cbcff3)
1SubDir HAIKU_TOP ;
2
3NotFile doc_files ;
4Depends files : doc_files ;
5
6# Prepare the optional build features before parsing the Jamfile tree.
7local architectureObject ;
8for architectureObject in [ MultiArchSubDirSetup ] {
9	on $(architectureObject) {
10		include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildFeatures ] ;
11	}
12}
13
14# Include packages that are required by all images.
15if ! $(HAIKU_BOOTSTRAP_BUILD) {
16	# primary architecture
17	AddHaikuImagePackages
18		bzip2 ctags ffmpeg freetype glu grep icu jpeg libpng libsolv mesa sed
19		tar which zlib
20		;
21
22	# secondary architectures
23	local architectureObject ;
24	for architectureObject
25			in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] {
26		on $(architectureObject) {
27			AddHaikuImagePackages
28				ffmpeg freetype glu icu jpeg libpng libsolv mesa zlib
29				;
30		}
31	}
32}
33
34# If enabled, make sure that OpenSSL is added to the image.
35if [ FIsBuildFeatureEnabled openssl ] {
36	AddHaikuImagePackages openssl ;
37}
38
39# add additionally requested packages
40AddHaikuImagePackages $(HAIKU_IMAGE_ADDITIONAL_PACKAGES) ;
41
42# Optionally we allow not to include the "src" subdirectory.
43if $(HAIKU_DONT_INCLUDE_SRC) {
44	# Don't include "src", but at least include the stuff needed for the
45	# build.
46	SubInclude HAIKU_TOP src build ;
47	SubInclude HAIKU_TOP src tools ;
48} else {
49	SubInclude HAIKU_TOP src ;
50}
51if $(HAIKU_INCLUDE_3RDPARTY) {
52	SubInclude HAIKU_TOP 3rdparty ;
53}
54
55# Perform deferred SubIncludes.
56ExecuteDeferredSubIncludes ;
57
58# reset subdir
59SubDir HAIKU_TOP ;
60
61# Execute post-build-target user config rules.
62UserBuildConfigRulePostBuildTargets	;
63
64# specify the Haiku image and network boot archive contents
65if $(HAIKU_BOOTSTRAP_BUILD) {
66	include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImageBootstrap ] ;
67} else {
68	include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImage ] ;
69}
70include [ FDirName $(HAIKU_BUILD_RULES_DIR) images NetBootArchive ] ;
71include [ FDirName $(HAIKU_BUILD_RULES_DIR) images FloppyBootImage ] ;
72include [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootImage ] ;
73include [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootPPCImage ] ;
74include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuCD ] ;
75include [ FDirName $(HAIKU_BUILD_RULES_DIR) images AnybootImage ] ;
76
77# Check whether all requested optional packages do actually exist.
78local package ;
79local packageError ;
80for package in $(HAIKU_ADDED_OPTIONAL_PACKAGES) {
81	if ! [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_EXISTS) ] {
82		Echo "ERROR: Requested optional package \"$(package)\" does not"
83			"exist." ;
84		packageError = 1 ;
85	}
86}
87if $(packageError) {
88	Exit ;
89}
90
91# Pseudo-target to build all targets that are localized.
92NotFile LocalizedTargets ;
93Depends LocalizedTargets : $(HAIKU_LOCALIZED_TARGETS) ;
94
95NotFile catalogs ;
96Depends catalogs : $(HAIKU_LOCALE_CATALOGS) ;
97
98NotFile catkeys ;
99Depends catkeys : $(HAIKU_LOCALE_OUTPUT_CATKEYS) ;
100