Last active
August 29, 2015 14:01
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PREFIX=/usr/local | |
if [[ $1 == --prefix=* ]] | |
then | |
PREFIX=`echo $1 | sed 's/--prefix=//'` | |
fi | |
sed "s|PREFIX=|PREFIX=${PREFIX}|" Makefile.in > Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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