From f84f31aad1caacf1a611f13719c4f7370628852e Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 10 Jan 2023 10:37:12 +0530 Subject: [PATCH] Add 7.9 - Build perl --- scripts/chapter7/7.9-perl.sh | 33 +++++++++++++++++++++++++++++++++ scripts/main.sh | 12 ++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 scripts/chapter7/7.9-perl.sh diff --git a/scripts/chapter7/7.9-perl.sh b/scripts/chapter7/7.9-perl.sh new file mode 100644 index 0000000..1066b0f --- /dev/null +++ b/scripts/chapter7/7.9-perl.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +cd $LFS/sources +tar xf perl-5.36.0.tar.xz +cd perl-5.36.0 + +sh Configure -des \ + -Dprefix=/usr \ + -Dvendorprefix=/usr \ + -Dprivlib=/usr/lib/perl5/5.36/core_perl \ + -Darchlib=/usr/lib/perl5/5.36/core_perl \ + -Dsitelib=/usr/lib/perl5/5.36/site_perl \ + -Dsitearch=/usr/lib/perl5/5.36/site_perl \ + -Dvendorlib=/usr/lib/perl5/5.36/vendor_perl \ + -Dvendorarch=/usr/lib/perl5/5.36/vendor_perl + +if [ $? -ne 0 ] +then + exit 1 +fi + +make -j5 + +if [ $? -ne 0 ] +then + exit 1 +fi + +make install + +cd $LFS/sources +rm -rf perl-5.36.0 + diff --git a/scripts/main.sh b/scripts/main.sh index f037020..c6da289 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -480,3 +480,15 @@ then stop_script "chapter7/7.8-bison.sh" fi +# Chapter 7.9 +# =========== +echo "Building perl" +su -c "bash $PWD/chapter7/7.9-perl.sh" + +# Exit on error +check_exit_code +if [ $exit_status -ne 0 ] +then + stop_script "chapter7/7.9-perl.sh" +fi +