diff options
| author | Steven Fackler <[email protected]> | 2014-01-20 20:20:10 -0800 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2014-01-20 20:20:10 -0800 |
| commit | e2554ea6af256c6ed3d7fd5a541ca2caac212181 (patch) | |
| tree | 14496f8f210ce338390e7b17429433bc71d9e574 | |
| parent | Switch doc link to rust-ci (diff) | |
| download | rust-openssl-e2554ea6af256c6ed3d7fd5a541ca2caac212181.tar.xz rust-openssl-e2554ea6af256c6ed3d7fd5a541ca2caac212181.zip | |
Add a configure script and an install target
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Makefile.in (renamed from Makefile) | 4 | ||||
| -rwxr-xr-x | configure | 18 |
3 files changed, 23 insertions, 1 deletions
@@ -1,3 +1,3 @@ -/.rust/ /doc/ /build/ +/Makefile @@ -1,6 +1,7 @@ RUSTC = rustc BUILDDIR = build RUSTFLAGS = -O -Z debug-info +INSTALL_DIR = %PREFIX% OPENSSL_LIB = lib.rs OPENSSL = $(BUILDDIR)/$(shell $(RUSTC) --crate-file-name $(OPENSSL_LIB)) @@ -30,6 +31,9 @@ clean: doc: $(OPENSSL) rustdoc $(OPENSSL_LIB) +install: $(OPENSSL) + install $(OPENSSL) $(INSTALL_DIR) + print-target: @echo $(OPENSSL) diff --git a/configure b/configure new file mode 100755 index 00000000..55cf6a0b --- /dev/null +++ b/configure @@ -0,0 +1,18 @@ +#!/bin/bash + +TEMP=`getopt -o "" --long prefix: -n "$0" -- "$@"` + +if [ $? != 0 ]; then exit 1; fi + +eval set -- "$TEMP" + +PREFIX=/usr/lib + +while true ; do + case "$1" in + --prefix) PREFIX=$2; shift 2;; + --) shift; break;; + esac +done + +sed -e "s|%PREFIX%|$PREFIX|" < Makefile.in > Makefile |