Linux HOWTOs

About | Home | Search


HOWTO: make
Description: GNU make utility to maintain groups of programs
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# GNU make 4.2.1
# ==============
# Slackware 13.37, 14.0, 14.1: make 3.82
# Slackware 14.2: make 4.1

# If you ever want to uninstall make, or if you want to clean up files
# from an old version before installing a new one, skip down to the
# bottom for instructions.

# If the download site used below is busy, try one of these:
# http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/make/
# http://ftp.gnu.org/gnu/make/
# ftp://ftp.gnu.org/gnu/make/

# Below I use --disable-nls because I only read/write English (well), if
# this is not the case for you, leave that off

# Prerequisites:
# Perl
# gettext (if no --disable-nls)
# pkg-config
# Guile 1.8 or 2.0.x (not 2.2.x)

# Get it
cd
test -f installed/make-4.2.1.tar.bz2 && mv installed/make-4.2.1.tar.bz2 .
test ! -f make-4.2.1.tar.bz2 &&
 wget http://ftpmirror.gnu.org/make/make-4.2.1.tar.bz2

# Verify tarball w/ sha1sum:
# (this came from my gpg-verified tarball)
echo "7d9d11eb36cfb752da1fb11bb3e521d2a3cc8830  make-4.2.1.tar.bz2" | \
sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys 6338B6D4 > /dev/null 2>&1 || gpg --recv-keys 6338B6D4 ) &&
 wget -nc http://ftpmirror.gnu.org/make/make-4.2.1.tar.bz2.sig &&
  gpg --verify make-4.2.1.tar.bz2.sig && rm make-4.2.1.tar.bz2.sig

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "make-*" -exec rm -r {} \;
tar xjvf ~/make-4.2.1.tar.bz2
cd make-4.2.1
test $UID = 0 && chown -R root:root .

# Apply this patch if you have Guile 2.2.x installed
# Not needed if you have 1.8 or 2.0.x
# ...or if you have >= 2.2.x and don't want Guile integration
wget -nc http://ftp.slackware.com/pub/slackware/slackware64-current/\
source/d/make/make.guile22.diff.gz &&
 zcat make.guile22.diff.gz | patch -p1 &&
  autoreconf -f -i

# Configure the build for 64-bit
test $(uname -m) = 'x86_64' &&
./configure --prefix=/usr --infodir=/usr/info --libdir=/usr/lib64 \
--mandir=/usr/man --without-guile --disable-nls

# Configure the build for anything else
test $(uname -m) != 'x86_64' &&
./configure --prefix=/usr --infodir=/usr/info --mandir=/usr/man \
--without-guile --disable-nls

# Build it
make

# Become root to install it
su

# Remove the Slackware package, any old translations from previous versions
test -x /sbin/removepkg && /sbin/removepkg gmake make
find /usr/share/locale -type f -name "make.mo" -exec rm {} \;

# Install the new version, using itself <g>, with a stripped 'make'
# binary.  Use regular 'make install' for a non-stripped 'make'.
./make install-strip

# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .

# Become yourself again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/make-*.tar.*
mv make-4.2.1.tar.bz2 installed/


# I can't imagine why you'd want to, but if you ever want to uninstall
# make, this should do it:
cd
su
test -d src/make-* && ( cd src/make-* ; ./make uninstall )
find /usr/share/locale -type f -name make.mo -exec rm {} \;
rm -f /usr/bin/make /usr/include/gnumake.h /usr/info/make.info \
/usr/man/man1/make.1
exit
find ~/src -maxdepth 1 -type d -name "make-*" -exec rm -r {} \;
rm -f ~/installed/make-*.tar.*

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>