Skip to content

Instantly share code, notes, and snippets.

@kaosf
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaosf/e1bb6c035c5cfbc846c1 to your computer and use it in GitHub Desktop.
Save kaosf/e1bb6c035c5cfbc846c1 to your computer and use it in GitHub Desktop.
Easy configure and Makefile.in suite; ./configure --prefix=$HOME && make && make install && make uninstall
#!/bin/bash
PREFIX=/usr/local
if [[ $1 == --prefix=* ]]
then
PREFIX=`echo $1 | sed 's/--prefix=//'`
fi
sed "s|PREFIX=|PREFIX=${PREFIX}|" Makefile.in > Makefile
PREFIX=
all:
install:
mkdir -p $(PREFIX)/bin
cp program $(PREFIX)/bin
uninstall:
rm $(PREFIX)/bin/program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment