# 2011 10 30 Mouse # This script carefully avoids the use of localisms such as mtar and # mfind, since it is needed to build git, and mtar and mfind are # gitted. # Make sure $LOCALROOT is set - for simplicity below, to avoid constantly # writing ${LOCALROOT:-/local}. : ${LOCALROOT:=/local} # Abbrevation for the version string VER=3.76.1 # Unpack the .gz file. gunzip < DIST/make-$VER.tar.gz | tar xvf - # Fix the unpacked directory name, and work in it mv make-$VER gnumake-$VER cd gnumake-$VER # Normally we'd do a paranoid check here, then normalize permissions, # but those would use mfind. # mfind . ! -type f ! -type d -ls # mfind . -type f ! -perm 07000/0 -ls # mfind . -type d ! -perm 0775 -print | xargs chmod 775 # mfind . -type f -perm 0111/0 ! -perm 0664 -print | xargs chmod 664 # mfind . -type f ! -perm 0111/0 ! -perm 0775 -print | xargs chmod 775 # Configure it. The "/dev/null"s are compiled into the source as part of # search paths; there seems to be no way to avoid having them there at all, # and the thing arrogantly insists on putting a few other directories in # those paths without any way to configure it otherwise. The infodir is # because there seems to be no way to not have make install install the # info files, which we have no use for. So we have it install them in a # trash directory that will get blown away when we remove the build area. ./configure --bindir=$LOCALROOT/.bin/gnumake-$VER --libdir=/dev/null --includedir=/dev/null --infodir=`pwd`/junk # Build it make # Install it make install # The bloody thing installs itself as "make". Rename it so we don't lose # the real make. mv $LOCALROOT/.bin/gnumake-$VER/make $LOCALROOT/.bin/gnumake-$VER/gnumake # The FSF seems more interested in pushing its religion than in documenting # its software in the way everybody else in the known world does. Drop in # a minimalist manpage to at least explain.... mkdir -p $LOCALROOT/.man/gnumake-$VER/man1 cp ../manpage $LOCALROOT/.man/gnumake-$VER/man1/gnumake.1 # Clean up cd .. rm -rf gnumake-$VER