diff options
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/configure b/configure new file mode 100755 index 0000000..1e55dd5 --- /dev/null +++ b/configure | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | for arg in $@; do | ||
| 4 | case $arg in | ||
| 5 | --prefix=*) | ||
| 6 | destdir=$(echo $arg | cut -d= -f2-) | ||
| 7 | ;; | ||
| 8 | *) | ||
| 9 | ;; | ||
| 10 | esac | ||
| 11 | done | ||
| 12 | |||
| 13 | if [ -z "$destdir" ]; then | ||
| 14 | destdir="/usr" | ||
| 15 | fi | ||
| 16 | |||
| 17 | cat <<MAKEFILE > Makefile | ||
| 18 | # Generated on $(date) by $(whoami)@$(hostname) | ||
| 19 | |||
| 20 | DESTDIR = $destdir | ||
| 21 | |||
| 22 | install: | ||
| 23 | @mkdir -vp "\$(DESTDIR)/bin/" | ||
| 24 | @install -vm 755 dmenu_app "\$(DESTDIR)/bin/" | ||
| 25 | |||
| 26 | uninstall: | ||
| 27 | @-rm -fv -- '\$(DESTDIR)/bin/dmenu_app' | ||
| 28 | |||
| 29 | .PHONY: install uninstall | ||
| 30 | MAKEFILE | ||
| 31 | # vim: set ts=8 sw=8 tw=0 noet : | ||
