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