xref: /haiku/configure (revision 29ef597dc60457e9133b7b24fac26190157c51a9)
152a38012Sejakowatz#!/bin/sh
252a38012Sejakowatz#
3338b8dc3SIngo Weinhold# configure [ <options> ]
4614026d7Sshatty
5022fa244SIngo Weinhold# usage
6022fa244SIngo Weinhold#
7022fa244SIngo Weinhold# Prints usage.
8022fa244SIngo Weinhold#
9022fa244SIngo Weinholdusage()
10022fa244SIngo Weinhold{
11022fa244SIngo Weinhold	cat << EOF
12022fa244SIngo Weinhold
13022fa244SIngo WeinholdUsage: $0 <options>
14022fa244SIngo Weinholdoptions:
15022fa244SIngo Weinhold  --floppy <floppy location>  Specifies the location of the floppy
16022fa244SIngo Weinhold                              (device or image).
176f9587ddSAxel Dörfler  --bochs-debug               Enables bochs serial debug emulation (activated 
186f9587ddSAxel Dörfler                              via kernel settings file).
19338b8dc3SIngo Weinhold  --cross-tools-prefix <prefix>
20338b8dc3SIngo Weinhold                              Assume cross compilation. <prefix> should be a
21338b8dc3SIngo Weinhold                              path to the directory where the cross
22338b8dc3SIngo Weinhold                              compilation tools are located, plus the platform
23338b8dc3SIngo Weinhold                              prefix, e.g. "/path/to/tools/i586-pc-beos-".
24338b8dc3SIngo Weinhold                              This overrides the HAIKU_* tool variables.
25338b8dc3SIngo Weinhold  --build-cross-tools <build tools dir>
26338b8dc3SIngo Weinhold                              Assume cross compilation. <build tools dir>
27338b8dc3SIngo Weinhold                              defines the location of the build tools sources.
28338b8dc3SIngo Weinhold                              They will be compiled and placed in the output
29338b8dc3SIngo Weinhold                              directory under "cross-tools". The HAIKU_* tools
30338b8dc3SIngo Weinhold                              variables will be set accordingly.
31*29ef597dSIngo Weinhold  --build-cross-tools-gcc4 <build tools dir>
32*29ef597dSIngo Weinhold                              Like "--build-cross-tools" just that gcc 4 will
33*29ef597dSIngo Weinhold                              be used for cross-compilation. Note, that the
34*29ef597dSIngo Weinhold                              resulting Haiku installation built with gcc 4
35*29ef597dSIngo Weinhold                              will not be binary compatible with BeOS R5.
36614026d7Sshatty  --target=TARGET             Select build target platform. [default=${target}]
37a17b9c0cSshatty                              valid targets=r5,bone,dano,haiku
38e91f3ca1Sbeveloper  --include-gpl-addons        Include GPL licensed add-ons.
39022fa244SIngo Weinhold  --help                      Prints out this help.
40338b8dc3SIngo Weinhold
41338b8dc3SIngo Weinholdenvironment variables:
42338b8dc3SIngo Weinhold  HAIKU_AR                    The static library archiver. Defaults to "ar".
43338b8dc3SIngo Weinhold  HAIKU_CC                    The compiler. Defaults to "gcc".
44338b8dc3SIngo Weinhold  HAIKU_LD                    The linker. Defaults to "ld".
45338b8dc3SIngo Weinhold  HAIKU_OBJCOPY               The objcopy to be used. Defaults to "objcopy".
46338b8dc3SIngo Weinhold  HAIKU_RANLIB                The static library indexer. Defaults to "ranlib".
47338b8dc3SIngo Weinhold  HAIKU_CPPFLAGS              The preprocessor flags. Defaults to "".
48338b8dc3SIngo Weinhold  HAIKU_CCFLAGS               The C flags. Defaults to "".
49338b8dc3SIngo Weinhold  HAIKU_CXXFLAGS              The C++ flags. Defaults to "".
50338b8dc3SIngo Weinhold  HAIKU_LDFLAGS               The linker flags. Defaults to "".
51338b8dc3SIngo Weinhold  HAIKU_ARFLAGS               The flags passed to HAIKU_AR for archiving.
52338b8dc3SIngo Weinhold                              Defaults to "ru".
53338b8dc3SIngo Weinhold  HAIKU_UNARFLAGS             The flags passed to HAIKU_AR for unarchiving.
54338b8dc3SIngo Weinhold                              Defaults to "x".
55022fa244SIngo WeinholdEOF
56022fa244SIngo Weinhold}
57022fa244SIngo Weinhold
58022fa244SIngo Weinhold# assertparam
59022fa244SIngo Weinhold#
60022fa244SIngo Weinhold# Checks whether at least one parameter is left.
61022fa244SIngo Weinhold#
62022fa244SIngo Weinholdassertparam()
63022fa244SIngo Weinhold{
64022fa244SIngo Weinhold	if [ $2 \< 2 ]; then
65022fa244SIngo Weinhold		echo $0: \`$1\': Parameter expected.
66022fa244SIngo Weinhold		exit 1
67022fa244SIngo Weinhold	fi
68022fa244SIngo Weinhold}
69022fa244SIngo Weinhold
7009c5682dSIngo Weinhold# standard_gcc_settings
7109c5682dSIngo Weinhold#
7209c5682dSIngo Weinhold# Sets the variables for a GCC platform.
7309c5682dSIngo Weinhold#
7409c5682dSIngo Weinholdstandard_gcc_settings()
7509c5682dSIngo Weinhold{
7609c5682dSIngo Weinhold	# PLATFORM_LINKLIBS
77338b8dc3SIngo Weinhold	gcclib=`$HAIKU_CC -print-libgcc-file-name`
7809c5682dSIngo Weinhold	gccdir=`dirname ${gcclib}`
79338b8dc3SIngo Weinhold	haikuGCCVersion=`$HAIKU_CC -dumpversion`
80338b8dc3SIngo Weinhold	haikuGCCMachine=`$HAIKU_CC -dumpmachine`
81338b8dc3SIngo Weinhold
82338b8dc3SIngo Weinhold	HAIKU_GCC_LIB_DIR=${gccdir}
83338b8dc3SIngo Weinhold	HAIKU_GCC_LIBGCC=${gccdir}/libgcc.a
84338b8dc3SIngo Weinhold	HAIKU_GCC_GLUE_CODE="crtbegin.o crtend.o"
85338b8dc3SIngo Weinhold	HAIKU_GCC_HEADERS_DIR=${gccdir}/include
86338b8dc3SIngo Weinhold	HAIKU_GCC_LIBGCC_OBJECTS=`ar t ${HAIKU_GCC_LIBGCC}`
878b5934c9SIngo Weinhold
88c89fc875SIngo Weinhold	# for gcc 4 we use the libstdc++ and libsupc++ that come with the compiler
898b5934c9SIngo Weinhold	case $haikuGCCVersion in
908b5934c9SIngo Weinhold		4.*)
918b5934c9SIngo Weinhold			haikuStaticLibStdCxx=`$HAIKU_CC -print-file-name=libstdc++.a`
928b5934c9SIngo Weinhold			haikuSharedLibStdCxx=`$HAIKU_CC -print-file-name=libstdc++.so`
93c89fc875SIngo Weinhold			haikuStaticLibSupCxx=`$HAIKU_CC -print-file-name=libsupc++.a`
94c89fc875SIngo Weinhold			haikuSharedLibSupCxx=`$HAIKU_CC -print-file-name=libsupc++.so`
958b5934c9SIngo Weinhold			local headers=$gccdir/../../../../include/c++/$haikuGCCVersion
968b5934c9SIngo Weinhold			haikuCxxHeadersDir=$headers
97*29ef597dSIngo Weinhold			for d in $haikuGCCMachine backward ext; do
98*29ef597dSIngo Weinhold				# Note: We need the line break, otherwise the line might become
99*29ef597dSIngo Weinhold				# too long for jam (512 bytes max).
100*29ef597dSIngo Weinhold				haikuCxxHeadersDir="$haikuCxxHeadersDir
101*29ef597dSIngo Weinhold					$headers/$d"
1028b5934c9SIngo Weinhold			done
1038b5934c9SIngo Weinhold
1048b5934c9SIngo Weinhold			if [ $haikuStaticLibStdCxx = libstdc++.a ]; then
1058b5934c9SIngo Weinhold				haikuStaticLibStdCxx=
1068b5934c9SIngo Weinhold			fi
1078b5934c9SIngo Weinhold			if [ $haikuSharedLibStdCxx = libstdc++.so ]; then
1088b5934c9SIngo Weinhold				haikuSharedLibStdCxx=
1098b5934c9SIngo Weinhold			fi
110c89fc875SIngo Weinhold			if [ $haikuStaticLibSupCxx = libsupc++.a ]; then
111c89fc875SIngo Weinhold				haikuStaticLibSupCxx=
112c89fc875SIngo Weinhold			fi
113c89fc875SIngo Weinhold			if [ $haikuSharedLibSupCxx = libsupc++.so ]; then
114c89fc875SIngo Weinhold				haikuSharedLibSupCxx=
115c89fc875SIngo Weinhold			fi
1168b5934c9SIngo Weinhold		;;
1178b5934c9SIngo Weinhold	esac
11809c5682dSIngo Weinhold}
11909c5682dSIngo Weinhold
120338b8dc3SIngo Weinhold# set_default_value
121338b8dc3SIngo Weinhold#
122338b8dc3SIngo Weinhold# Set the value for a variable, if no value is set yet.
123338b8dc3SIngo Weinhold#
124338b8dc3SIngo Weinholdset_default_value()
125338b8dc3SIngo Weinhold{
126338b8dc3SIngo Weinhold	local var=$1;
127338b8dc3SIngo Weinhold	# any better way?
128338b8dc3SIngo Weinhold	(set -u; (eval "echo \${$var}") &> /dev/null) || eval "$var=$2"
129338b8dc3SIngo Weinhold}
130338b8dc3SIngo Weinhold
131338b8dc3SIngo Weinhold# get_build_tool_path
132338b8dc3SIngo Weinhold#
133338b8dc3SIngo Weinhold# Gets a usable absolute path of a build tool.
134338b8dc3SIngo Weinhold#
135338b8dc3SIngo Weinholdget_build_tool_path()
136338b8dc3SIngo Weinhold{
137338b8dc3SIngo Weinhold	local var="HAIKU_$1"
138338b8dc3SIngo Weinhold	local tool=$2
139338b8dc3SIngo Weinhold	local path="${crossToolsPrefix}$tool"
140338b8dc3SIngo Weinhold
141338b8dc3SIngo Weinhold	if [ -f "$path" ]; then
142338b8dc3SIngo Weinhold		# get absolute path
143338b8dc3SIngo Weinhold		local oldPwd=$(pwd)
144338b8dc3SIngo Weinhold		cd $(dirname "$path")
145338b8dc3SIngo Weinhold		path="$(pwd)/$(basename "$path")"
146338b8dc3SIngo Weinhold		cd $oldPwd
147338b8dc3SIngo Weinhold	else
148338b8dc3SIngo Weinhold		which "$path" &> /dev/null || {
149338b8dc3SIngo Weinhold			echo "Build tool \"$path\" not found." >&2
150338b8dc3SIngo Weinhold			exit 1
151338b8dc3SIngo Weinhold		}
152338b8dc3SIngo Weinhold	fi
153338b8dc3SIngo Weinhold
154338b8dc3SIngo Weinhold	eval "$var=$path"
155338b8dc3SIngo Weinhold}
156338b8dc3SIngo Weinhold
157338b8dc3SIngo Weinhold# get cwd and the source directory
158338b8dc3SIngo WeinholdcurrentDir=`pwd`
159338b8dc3SIngo Weinholdcd `dirname $0`
160338b8dc3SIngo WeinholdsourceDir=`pwd`
161338b8dc3SIngo Weinholdcd $currentDir
162338b8dc3SIngo Weinhold
163022fa244SIngo Weinhold# default parameter values
164022fa244SIngo Weinhold#
16552a38012Sejakowatzplatform=`uname`
166338b8dc3SIngo WeinholdhaikuGCCVersion=
1678b5934c9SIngo WeinholdhaikuStaticLibStdCxx=
1688b5934c9SIngo WeinholdhaikuSharedLibStdCxx=
169c89fc875SIngo WeinholdhaikuStaticLibSupCxx=
170c89fc875SIngo WeinholdhaikuSharedLibSupCxx=
1718b5934c9SIngo WeinholdhaikuCxxHeadersDir=
1728b5934c9SIngo WeinholdhostGCCVersion=`cc -dumpversion`
173022fa244SIngo Weinholdfloppy=
1742b94bc7bSlillobochs_debug=0
175e91f3ca1Sbeveloperinclude_gpl_addons=0
17662339647SAxel Dörflertarget=haiku
177338b8dc3SIngo WeinholdcrossToolsPrefix=
178338b8dc3SIngo WeinholdbuildCrossTools=
179*29ef597dSIngo WeinholdbuildCrossToolsScript="$sourceDir/build/scripts/build_cross_tools"
180338b8dc3SIngo Weinhold
181338b8dc3SIngo Weinholdset_default_value HAIKU_AR			ar
182338b8dc3SIngo Weinholdset_default_value HAIKU_CC			gcc
183338b8dc3SIngo Weinholdset_default_value HAIKU_LD			ld
184338b8dc3SIngo Weinholdset_default_value HAIKU_OBJCOPY		objcopy
185338b8dc3SIngo Weinholdset_default_value HAIKU_RANLIB		ranlib
186338b8dc3SIngo Weinholdset_default_value HAIKU_CPPFLAGS	""
187338b8dc3SIngo Weinholdset_default_value HAIKU_CCFLAGS		""
188338b8dc3SIngo Weinholdset_default_value HAIKU_CXXFLAGS	""
189338b8dc3SIngo Weinholdset_default_value HAIKU_LDFLAGS		""
190338b8dc3SIngo Weinholdset_default_value HAIKU_ARFLAGS		ru
191338b8dc3SIngo Weinholdset_default_value HAIKU_UNARFLAGS	x
19262339647SAxel Dörfler
193022fa244SIngo Weinhold# parse parameters
194022fa244SIngo Weinhold#
195022fa244SIngo Weinholdwhile [ $# \> 0 ] ; do
196022fa244SIngo Weinhold	case "$1" in
197e91f3ca1Sbeveloper		--include-gpl-addons)	include_gpl_addons=1; shift 1;;
198022fa244SIngo Weinhold		--floppy)		assertparam "$1" $#; floppy=$2; shift 2;;
1992b94bc7bSlillo		--bochs-debug)	bochs_debug=1; shift 1;;
2007c8bb86fSIngo Weinhold		--target=*)     target=`echo $1 | cut -d'=' -f2-`; shift 1;;
201338b8dc3SIngo Weinhold		--cross-tools-prefix) assertparam "$1" $#; crossToolsPrefix=$2; shift 2;;
202338b8dc3SIngo Weinhold		--build-cross-tools) assertparam "$1" $#; buildCrossTools=$2; shift 2;;
203*29ef597dSIngo Weinhold		--build-cross-tools-gcc4) assertparam "$1" $#; buildCrossTools=$2;
204*29ef597dSIngo Weinhold						buildCrossToolsScript="${buildCrossToolsScript}_gcc4";
205*29ef597dSIngo Weinhold						shift 2;;
206022fa244SIngo Weinhold		--help | -h)	usage; exit 0;;
207022fa244SIngo Weinhold		*)				echo Invalid argument: \`$1\'; exit 1;;
208022fa244SIngo Weinhold	esac
209022fa244SIngo Weinholddone
210022fa244SIngo Weinhold
211022fa244SIngo Weinhold# check parameters
212022fa244SIngo Weinhold#
213022fa244SIngo Weinholdif [ -n "$floppy" ]; then
214022fa244SIngo Weinhold	case "$floppy" in
215022fa244SIngo Weinhold		/*)	;;
216022fa244SIngo Weinhold		*)	echo "Warning: non-absolute floppy path. Parameter ignored.";
217022fa244SIngo Weinhold			floppy=;;
218022fa244SIngo Weinhold	esac
219022fa244SIngo Weinholdfi
22052a38012Sejakowatz
2210df3cc9cSIngo Weinhold# detect the build platform
222338b8dc3SIngo Weinholdcase "${platform}" in
2230df3cc9cSIngo Weinhold	BeOS)	revision=`uname -r`
2240df3cc9cSIngo Weinhold			case "$revision" in
22514998c8bSIngo Weinhold				6.*)	buildPlatform=dano ;;
2260df3cc9cSIngo Weinhold				5.1)	buildPlatform=dano ;;
2270df3cc9cSIngo Weinhold				5.0.4)	buildPlatform=bone ;;
2280df3cc9cSIngo Weinhold				5.0*)	buildPlatform=r5 ;;
2290df3cc9cSIngo Weinhold				*)		echo Unknown BeOS version: $revision
2300df3cc9cSIngo Weinhold						exit 1 ;;
2310df3cc9cSIngo Weinhold			esac
2320df3cc9cSIngo Weinhold			;;
233338b8dc3SIngo Weinhold	Linux)	buildPlatform=linux ;;
23498391347SNathan Whitehorn	FreeBSD) buildPlatform=linux ;;
235338b8dc3SIngo Weinhold	*)		echo Unsupported platform: ${platform}
2364cbe4925SAxel Dörfler			exit 1 ;;
2374cbe4925SAxel Dörfleresac
23852a38012Sejakowatz
239338b8dc3SIngo Weinhold# create output directory
240338b8dc3SIngo Weinholdif [ "$currentDir" = "$sourceDir" ]; then
241338b8dc3SIngo Weinhold	outputDir=$currentDir/generated
242338b8dc3SIngo Weinholdelse
243338b8dc3SIngo Weinhold	outputDir=$currentDir
244338b8dc3SIngo Weinholdfi
245338b8dc3SIngo WeinholdbuildOutputDir=$outputDir/build
246338b8dc3SIngo WeinholdbuildAttributesDir=$outputDir/attributes
247338b8dc3SIngo Weinholdmkdir -p $buildOutputDir || exit 1
248338b8dc3SIngo Weinhold
249338b8dc3SIngo Weinhold# build cross tools from sources
250338b8dc3SIngo Weinholdif [ -n "$buildCrossTools" ]; then
251*29ef597dSIngo Weinhold	"$buildCrossToolsScript" "$sourceDir" "$buildCrossTools" \
252*29ef597dSIngo Weinhold		$outputDir || exit 1
253338b8dc3SIngo Weinhold	crossToolsPrefix=$outputDir/cross-tools/bin/i586-pc-beos-
254338b8dc3SIngo Weinholdfi
255338b8dc3SIngo Weinhold
256338b8dc3SIngo Weinhold# cross tools
257338b8dc3SIngo Weinholdif [ -n "$crossToolsPrefix" ]; then
258338b8dc3SIngo Weinhold	get_build_tool_path AR ar
259338b8dc3SIngo Weinhold	get_build_tool_path CC gcc
260338b8dc3SIngo Weinhold	get_build_tool_path LD ld
261338b8dc3SIngo Weinhold	get_build_tool_path OBJCOPY objcopy
262338b8dc3SIngo Weinhold	get_build_tool_path RANLIB ranlib
263338b8dc3SIngo Weinholdfi
264338b8dc3SIngo Weinhold
265338b8dc3SIngo Weinhold# prepare gcc settings
266338b8dc3SIngo Weinholdstandard_gcc_settings
267338b8dc3SIngo Weinhold
26852a38012Sejakowatz# Generate BuildConfig
269338b8dc3SIngo Weinholdcat << EOF > $buildOutputDir/BuildConfig
27052a38012Sejakowatz# BuildConfig
27152a38012Sejakowatz# Note: This file has been automatically generated by configure.
27252a38012Sejakowatz
27309c5682dSIngo WeinholdFLOPPY_PATH			?= "${floppy}" ;
27409c5682dSIngo WeinholdBOCHS_DEBUG_HACK	?= ${bochs_debug} ;
275e91f3ca1SbeveloperINCLUDE_GPL_ADDONS	?= ${include_gpl_addons} ;
276614026d7SshattyTARGET_PLATFORM 	?= ${target} ;
277338b8dc3SIngo WeinholdHOST_PLATFORM		?= ${buildPlatform} ;
278338b8dc3SIngo Weinhold
279338b8dc3SIngo WeinholdHAIKU_GCC_RAW_VERSION	?= ${haikuGCCVersion} ;
280338b8dc3SIngo WeinholdHAIKU_GCC_MACHINE		?= ${haikuGCCMachine} ;
281338b8dc3SIngo WeinholdHAIKU_GCC_LIB_DIR		?= ${HAIKU_GCC_LIB_DIR} ;
282338b8dc3SIngo WeinholdHAIKU_GCC_HEADERS_DIR	?= ${HAIKU_GCC_HEADERS_DIR} ;
283338b8dc3SIngo WeinholdHAIKU_GCC_LIBGCC		?= ${HAIKU_GCC_LIBGCC} ;
284338b8dc3SIngo Weinhold
2858b5934c9SIngo WeinholdHAIKU_STATIC_LIBSTDC++	?= ${haikuStaticLibStdCxx} ;
2868b5934c9SIngo WeinholdHAIKU_SHARED_LIBSTDC++	?= ${haikuSharedLibStdCxx} ;
287c89fc875SIngo WeinholdHAIKU_STATIC_LIBSUPC++	?= ${haikuStaticLibSupCxx} ;
288c89fc875SIngo WeinholdHAIKU_SHARED_LIBSUPC++	?= ${haikuSharedLibSupCxx} ;
2898b5934c9SIngo WeinholdHAIKU_C++_HEADERS_DIR	?= ${haikuCxxHeadersDir} ;
2908b5934c9SIngo Weinhold
291338b8dc3SIngo WeinholdHAIKU_BUILD_ATTRIBUTES_DIR	?= ${buildAttributesDir} ;
292338b8dc3SIngo Weinhold
293338b8dc3SIngo WeinholdHAIKU_AR			?= ${HAIKU_AR} ;
294338b8dc3SIngo WeinholdHAIKU_CC			?= ${HAIKU_CC} ;
295338b8dc3SIngo WeinholdHAIKU_LD			?= ${HAIKU_LD} ;
296338b8dc3SIngo WeinholdHAIKU_OBJCOPY		?= ${HAIKU_OBJCOPY} ;
297338b8dc3SIngo WeinholdHAIKU_RANLIB		?= ${HAIKU_RANLIB} ;
298338b8dc3SIngo WeinholdHAIKU_CPPFLAGS		?= ${HAIKU_CPPFLAGS} ;
299338b8dc3SIngo WeinholdHAIKU_CCFLAGS		?= ${HAIKU_CCFLAGS} ;
300338b8dc3SIngo WeinholdHAIKU_CXXFLAGS		?= ${HAIKU_CXXFLAGS} ;
301338b8dc3SIngo WeinholdHAIKU_LDFLAGS		?= ${HAIKU_LDFLAGS} ;
302338b8dc3SIngo WeinholdHAIKU_ARFLAGS		?= ${HAIKU_ARFLAGS} ;
303338b8dc3SIngo WeinholdHAIKU_UNARFLAGS		?= ${HAIKU_UNARFLAGS} ;
304338b8dc3SIngo Weinhold
3058b5934c9SIngo WeinholdHOST_GCC_RAW_VERSION	?= ${hostGCCVersion} ;
3068b5934c9SIngo Weinhold
307c4786ea6SlilloEOF
308c4786ea6Slillo
309b1e5b60cSAxel Dörfler# Libgcc.a objects
310b1e5b60cSAxel Dörfler
311338b8dc3SIngo Weinholdcat << EOF > $buildOutputDir/libgccObjects
312b1e5b60cSAxel Dörfler# libgcc.a objects to be linked against libroot.so
313b1e5b60cSAxel Dörfler# Note: This file has been automatically generated by configure.
314b1e5b60cSAxel Dörfler
315338b8dc3SIngo WeinholdHAIKU_GCC_LIBGCC_OBJECTS	?= ${HAIKU_GCC_LIBGCC_OBJECTS} ;
316b1e5b60cSAxel DörflerEOF
317b1e5b60cSAxel Dörfler
3184c74bde8SJérôme Duval# Generate Timezones binaries bindings
3194c74bde8SJérôme Duval
320338b8dc3SIngo WeinholdtimezoneSources="africa antarctica asia australasia europe northamerica
321338b8dc3SIngo Weinhold	southamerica pacificnew etcetera factory backward"
322338b8dc3SIngo Weinhold
323338b8dc3SIngo Weinholdcat << EOF > $buildOutputDir/Timezones
324b1e5b60cSAxel Dörfler# Timezones used for the build
325b1e5b60cSAxel Dörfler# Note: This file has been automatically generated by configure.
326b1e5b60cSAxel Dörfler
327338b8dc3SIngo WeinholdHAIKU_TIME_ZONE_SOURCES = ${timezoneSources} ;
328338b8dc3SIngo Weinhold
329b1e5b60cSAxel DörflerEOF
330b1e5b60cSAxel Dörfler
331338b8dc3SIngo Weinholdfor source in ${timezoneSources}; do
332338b8dc3SIngo Weinhold	f=$sourceDir/src/data/etc/timezones/$source
3334c74bde8SJérôme Duval
334d2ab012dSJérôme DuvalTZOBJECTS=`gawk '/^Zone/ { print $2 } /^Link/ { print $3 } ' $f `
3354c74bde8SJérôme Duval
336338b8dc3SIngo Weinholdcat << EOF >> $buildOutputDir/Timezones
337338b8dc3SIngo WeinholdTZ_OBJECTS on <timezone-source>${source} ?= $TZOBJECTS ;
3384c74bde8SJérôme DuvalEOF
3394c74bde8SJérôme Duvaldone
340338b8dc3SIngo Weinhold
341338b8dc3SIngo Weinhold# Generate a boot strap Jamfile in the output directory, if it is not in
342338b8dc3SIngo Weinhold# the source dir.
343338b8dc3SIngo Weinhold
344338b8dc3SIngo Weinholdif [ "$currentDir" != "$sourceDir" ]; then
345338b8dc3SIngo Weinhold
346338b8dc3SIngo Weinholdcat << EOF > $outputDir/Jamfile
347338b8dc3SIngo Weinhold# automatically generated Jamfile
348338b8dc3SIngo Weinhold
349338b8dc3SIngo WeinholdHAIKU_TOP			= ${sourceDir} ;
350338b8dc3SIngo WeinholdHAIKU_OUTPUT_DIR	= ${outputDir} ;
351338b8dc3SIngo Weinhold
352338b8dc3SIngo Weinholdinclude [ FDirName \$(HAIKU_TOP) Jamfile ] ;
353338b8dc3SIngo Weinhold
354338b8dc3SIngo WeinholdEOF
355338b8dc3SIngo Weinhold
356338b8dc3SIngo Weinholdfi
357338b8dc3SIngo Weinhold
358