source: scripts_home/scripts/target-scripts/target-flex.sh@ 1c9c5c3

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

r624@server (orig r622): jim | 2005-10-31 12:40:28 -0800
Rearranging Archive

  • Property mode set to 100755
File size: 1.6 KB
Line 
1#!/bin/bash
2
3# cross-lfs target flex build
4# ---------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=flex-target.build
13
14unpack_tarball flex-${FLEX_VER} &&
15cd ${PKGDIR}
16
17#if we are building multi-arch, only build for the default env
18set_libdirname
19setup_multiarch
20
21if [ "${USE_SYSROOT}" = "Y" ]; then
22 BUILD_PREFIX=/usr
23 INSTALL_PREFIX="${LFS}${BUILD_PREFIX}"
24 INSTALL_OPTIONS="DESTDIR=${LFS}"
25else
26 BUILD_PREFIX=${TGT_TOOLS}
27 INSTALL_PREFIX="${TGT_TOOLS}"
28 INSTALL_OPTIONS=""
29fi
30
31if [ ! "${LIBDIRNAME}" = "lib" ]; then
32 extra_conf="--libdir=${BUILD_PREFIX}/${libdirname}"
33fi
34
35case ${FLEX_VER} in
36 2.5.31 )
37 # Fix brokenness in flex-2.5.31
38 apply_patch flex-2.5.31-debian_fixes-2
39 # do not regen doc (triggered by above patch)
40 touch ./doc/flex.1
41 ;;
42esac
43
44max_log_init Flex ${FLEX_VER} "target (shared)" ${CONFLOGS} ${LOG}
45CC="${TARGET}-gcc ${ARCH_CFLAGS}" \
46CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
47./configure --prefix=${BUILD_PREFIX} \
48 --host=${TARGET} ${extra_conf} \
49 --disable-nls \
50 >> ${LOGFILE} 2>&1 &&
51echo " o Configure OK" &&
52
53min_log_init ${BUILDLOGS} &&
54#make ${PMFLAGS} LDFLAGS="-s" \
55make ${PMFLAGS} LDFLAGS="-s" \
56 >> ${LOGFILE} 2>&1 &&
57echo " o Build OK" &&
58
59min_log_init ${INSTLOGS} &&
60make ${INSTALL_OPTIONS} install \
61 >> ${LOGFILE} 2>&1 &&
62echo " o ALL OK" || barf
63
64# Create lex wrapper
65cat > ${INSTALL_PREFIX}/bin/lex << "EOF"
66#!/bin/sh
67# Begin ${BUILD_PREFIX}/bin/lex
68
69exec ${BUILD_PREFIX}/bin/flex -l "$@"
70
71# End ${BUILD_PREFIX}/bin/lex
72EOF
73
74chmod 755 ${INSTALL_PREFIX}/bin/lex
75
Note: See TracBrowser for help on using the repository browser.