source: scripts/scripts/target-scripts/target-grep.sh @ d7f7ff5

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

r2509@server (orig r1248): ryan | 2006-03-10 02:08:10 -0800

r1298@rei: lfs | 2006-03-09 18:48:02 +1100
remove .patch from patch filename


  • Property mode set to 100755
File size: 1.1 KB
Line 
1#!/bin/bash
2
3# cross-lfs target grep build
4# ---------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=grep-target.log
13
14unpack_tarball grep-${GREP_VER} &&
15cd ${PKGDIR}
16
17set_libdirname
18setup_multiarch
19
20if [ "${USE_SYSROOT}" = "Y" ]; then
21   BUILD_PREFIX=/usr
22   INSTALL_PREFIX="${LFS}${BUILD_PREFIX}"
23   INSTALL_OPTIONS="DESTDIR=${LFS}"
24else
25   BUILD_PREFIX=${TGT_TOOLS}
26   INSTALL_PREFIX="${TGT_TOOLS}"
27   INSTALL_OPTIONS=""
28fi
29
30case ${GREP_VER} in
31   2.5.1a ) apply_patch grep-2.5.1a-redhat_fixes-2 ;;
32esac
33
34max_log_init Grep ${GREP_VER} "target (shared)" ${CONFLOGS} ${LOG}
35CC="${TARGET}-gcc ${ARCH_CFLAGS}" \
36CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
37./configure --prefix=${BUILD_PREFIX} --host=${TARGET} \
38   --disable-perl-regexp --with-included-regex \
39   >> ${LOGFILE} 2>&1 &&
40echo " o Configure OK" &&
41
42min_log_init ${BUILDLOGS} &&
43make ${PMFLAGS} LDFLAGS="-s" \
44   >> ${LOGFILE} 2>&1 &&
45echo " o Build OK" || barf
46
47min_log_init ${INSTLOGS} &&
48make ${INSTALL_OPTIONS} install \
49   >> ${LOGFILE} 2>&1 &&
50echo " o ALL OK" || barf
51
Note: See TracBrowser for help on using the repository browser.