source: scripts/scripts/native-scripts/native-gawk.sh @ 7f65c0e

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 7f65c0e 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.2 KB
Line 
1#!/bin/bash
2
3# cross-lfs native gawk build
4# ---------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=gawk-native.log
13
14set_libdirname
15setup_multiarch
16
17unpack_tarball gawk-${GAWK_VER} &&
18cd ${PKGDIR}
19
20# Following mimics gawk patch
21files="Makefile.in awklib/Makefile.in"
22for file in ${files}; do
23
24   test -f ${file}-ORIG ||
25      cp ${file} ${file}-ORIG
26
27   sed -e 's:libexecdir = @libexecdir@/awk:libexecdir = @libexecdir@:g' \
28       -e 's:datadir = @datadir@/awk:datadir = @datadir@/gawk:g' \
29       ${file}-ORIG > ${file}
30done
31
32max_log_init Gawk ${GAWK_VER} "native (shared)" ${CONFLOGS} ${LOG}
33CC="${CC-gcc} ${ARCH_CFLAGS}" \
34CFLAGS="-O2 -pipe ${TGT_CFLAGS}" \
35./configure --prefix=/usr \
36   --libexecdir=/usr/${libdirname}/gawk \
37   --bindir=/bin \
38   >> ${LOGFILE} 2>&1 &&
39echo " o Configure OK" &&
40
41min_log_init ${BUILDLOGS} &&
42make ${PMFLAGS} LDFLAGS="-s" \
43   >> ${LOGFILE} 2>&1 &&
44echo " o Build OK" &&
45
46min_log_init ${TESTLOGS} &&
47make check \
48   >> ${LOGFILE} 2>&1 &&
49echo " o Test OK" &&
50
51min_log_init ${INSTLOGS} &&
52make install \
53   >> ${LOGFILE} 2>&1 &&
54echo " o ALL OK" || barf
55
56# When specifying --bindir the symlink doesn't get created (???)
57ln -sf gawk /bin/awk
58
Note: See TracBrowser for help on using the repository browser.