source: scripts/scripts/native-scripts/native-flex.sh @ e0507947

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since e0507947 was 7f65c0e, checked in by Jim Gifford <clfs@…>, 18 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

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