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