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

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since be9c22a 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: 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.