source: scripts/build-native-triarch.sh@ 12ba0a4

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 12ba0a4 was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 5.4 KB
Line 
1#!/bin/bash
2
3# build-native.sh
4#
5# Script to finish build for target natively
6#
7# Authors: Ryan Oliver <ryan.oliver@pha.com.au
8# Finn Thain
9#
10# $LastChangedBy$
11# $LastChangedDate$
12# $LastChangedRevision$
13
14set +h
15
16# Set SELF to be name of script called, minus any path...
17SELF=$(basename ${0})
18echo "Running ${SELF}"
19VERSION="3.0.1"
20DATE=$(date +'%Y%m%d')
21export DATE
22
23# Read in build configuration information
24# plfs-config should reside in the same directory as this script.
25# We need to use dirname to determine where to find it as SCRIPTS
26# env var is not set yet (set in plfs-config itself)
27. `dirname ${0}`/plfs-config
28
29# Sanity check, are ${LFS}, ${HST_TOOLS} and ${TGT_TOOLS} set?
30if [ "X${LFS}" = "X" -o "X${HST_TOOLS}" = "X" -o "X${TGT_TOOLS}" = "X" ]; then
31 echo "Error: Not all required environment vars have been set." 1>&2
32 echo " Check plfs-config" 1>&2
33 exit 1
34fi
35
36export LFS=""
37
38# Get package version information
39. ${SCRIPTS}/plfs-packages
40
41# Source Functions and definitions
42. ${SCRIPTS}/build-init.sh
43
44
45set +x
46unset LD_LIBRARY_PATH
47unset LD_PRELOAD
48
49# Configure uses these if set, and will not look for a cross-compiler
50unset CC CXX
51
52export LDFLAGS="-s"
53
54# Setup PATH
55export PATH=/bin:/sbin:/usr/bin:/usr/sbin
56export PATH=${PATH}:${TGT_TOOLS}/bin:${TGT_TOOLS}/sbin
57
58# If ${SRC} does not exist, create it
59test -d ${SRC} || mkdir -p ${SRC}
60
61mkdir -p ${CONFLOGS}
62mkdir -p ${BUILDLOGS}
63mkdir -p ${INSTLOGS}
64mkdir -p ${TESTLOGS}
65cd ${SRC}
66
67#scripts_dir="cross-scripts-${VERSION}"
68scripts_dir="native-scripts"
69
70# scripts for building target tools
71test "Y" = "${MULTIARCH}" &&
72{
73script_list="temp-tcl-32.sh
74temp-tcl-n32.sh
75temp-tcl-64.sh
76temp-expect-32.sh
77temp-expect-n32.sh
78temp-expect-64.sh
79temp-dejagnu.sh
80temp-texinfo.sh
81temp-perl-32.sh
82temp-perl-n32.sh
83temp-perl-64.sh
84copy-kern-hdrs.sh
85native-glibc-32.sh
86native-glibc-n32.sh
87native-glibc-64.sh"
88} || {
89script_list="temp-tcl.sh
90temp-expect.sh
91temp-dejagnu.sh
92temp-texinfo.sh
93temp-perl.sh
94copy-kern-hdrs.sh
95native-glibc.sh"
96}
97
98script_list="${script_list}
99temp-binutils.sh
100specs-mod.sh
101native-binutils.sh
102native-gcc.sh"
103
104test Y = "${MULTIARCH}" &&
105{
106script_list="${script_list}
107native-zlib-32.sh
108native-zlib-n32.sh
109native-zlib-64.sh"
110} || {
111script_list="${script_list}
112native-zlib.sh"
113}
114
115script_list="${script_list}
116native-findutils.sh
117native-gawk.sh"
118
119test Y = "${MULTIARCH}" &&
120{
121script_list="${script_list}
122native-ncurses-32.sh
123native-ncurses-n32.sh
124native-ncurses-64.sh"
125} || {
126script_list="${script_list}
127native-ncurses.sh"
128}
129
130test Y = "${USE_READLINE}" &&
131{
132test Y = "${MULTIARCH}" &&
133{
134script_list="${script_list}
135native-readline-32.sh
136native-readline-n32.sh
137native-readline-64.sh"
138} || {
139script_list="${script_list}
140native-readline.sh"
141}
142}
143
144script_list="${script_list}
145native-vim.sh
146native-m4.sh
147native-bison.sh
148native-less.sh
149native-groff.sh
150native-coreutils.sh
151native-sed.sh"
152
153test Y = "${MULTIARCH}" &&
154{
155script_list="${script_list}
156native-flex-32.sh
157native-flex-n32.sh
158native-flex-64.sh
159native-gettext-32.sh
160native-gettext-n32.sh
161native-gettext-64.sh
162native-nettools.sh
163native-inetutils.sh
164native-iproute2.sh
165native-perl-32.sh
166native-perl-n32.sh
167native-perl-64.sh
168native-texinfo.sh
169native-autoconf.sh
170native-automake.sh
171native-bash.sh
172native-file-32.sh
173native-file-n32.sh
174native-file-64.sh"
175} || {
176script_list="${script_list}
177native-flex.sh
178native-gettext.sh
179native-nettools.sh
180native-inetutils.sh
181native-iproute2.sh
182native-perl.sh
183native-texinfo.sh
184native-autoconf.sh
185native-automake.sh
186native-bash.sh
187native-file.sh"
188}
189
190# ARGH libtool.. gonna have to do some
191# thinking about how to handle this for bi-arch...
192test Y = "${MULTIARCH}" &&
193{
194script_list="${script_list}
195native-libtool-32.sh
196native-libtool-n32.sh
197native-libtool-64.sh"
198} || {
199script_list="${script_list}
200native-libtool.sh"
201}
202
203test Y = "${MULTIARCH}" &&
204{
205script_list="${script_list}
206native-bzip2-32.sh
207native-bzip2-n32.sh
208native-bzip2-64.sh"
209} || {
210script_list="${script_list}
211native-bzip2.sh"
212}
213
214script_list="${script_list}
215native-diffutils.sh
216native-ed.sh
217native-kbd.sh
218native-e2fsprogs.sh
219native-grep.sh
220native-gzip.sh
221native-man.sh
222native-make.sh
223native-module-init-tools.sh
224native-patch.sh
225native-procinfo.sh"
226
227test Y = "${MULTIARCH}" &&
228{
229script_list="${script_list}
230native-procps-32.sh
231native-procps-n32.sh
232native-procps-64.sh
233native-shadow-32.sh
234native-shadow-n32.sh
235native-shadow-64.sh"
236} || {
237script_list="${script_list}
238native-procps.sh
239native-shadow.sh"
240}
241
242script_list="${script_list}
243native-sysklogd.sh
244native-sysvinit.sh
245native-tar.sh
246native-util-linux.sh
247native-dev.sh"
248
249
250
251SCRIPTLIST=`echo "${script_list}" | \
252 sed "s@\(.*\)@${scripts_dir}/\1@"`
253
254# Check if we are resuming from a particular script
255test ! -z "${1}" &&
256{
257 SCRIPTLIST=`echo ${SCRIPTLIST} | sed "s@.*\(${1}.*\)@\1@g"`
258}
259
260echo ' o Checking for needed sources and tarballs'
261check_tarballs ${SCRIPTLIST}
262
263for script in ${SCRIPTLIST}; do
264 echo "Running ${SCRIPTS}/${script}"
265 # HACK: export SELF to be the script we are running
266 # (keeps logfile output correct)
267 export SELF=${script}
268 ${SCRIPTS}/${script}
269
270 test 0 = ${?} ||
271 {
272 echo
273 echo "Failed script was ${script}"
274 echo "Please fix the error above from"
275 echo " ${SCRIPTS}/${script}"
276 echo "and rerun the build with the command"
277 echo
278 echo " ${0} $script"
279 echo
280 echo "to resume the build."
281 exit 1
282 }
283done
Note: See TracBrowser for help on using the repository browser.