# GNU make 4.4.1
# ==============
# Slackware 14.0, 14.1: make 3.82
# Slackware 14.2: make 4.1
# Slackware 15.0: make 4.3
# 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.
# Get the source tarball
cd
test -f installed/make-4.4.1.tar.lz && mv installed/make-4.4.1.tar.lz .
test ! -f make-4.4.1.tar.lz &&
wget http://ftpmirror.gnu.org/make/make-4.4.1.tar.lz
# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "make-*" -exec rm -r {} \;
tar xv --lzip -f ~/make-4.4.1.tar.lz
cd make-4.4.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
# If you only read/write English (well), you may want --disable-nls
# If you don't need Guile support, add --without-guile
# I had some issues with Guile 2.2.x and make 4.2.1, had to use
# a patch and/or compiled without Guile support.
# With make 4.4.1, compiled successfully with Guile 3.0.x support
# (and no patch).
# 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, if there is one
test -x /sbin/removepkg && /sbin/removepkg gmake make
# Remove gettext .mo files from old releases in case this version of make
# is missing one that an old version of make had
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
# Create a 'gmake' symlink
test ! -L /usr/bin/gmake && ln -s /usr/bin/make /usr/bin/gmake
# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .
# Become yourself again
exit
# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/make-*.tar.*
mv make-4.4.1.tar.lz 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.*