summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--Makefile6
-rwxr-xr-xconfigure27
3 files changed, 38 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ed7530bc..e2d3b0e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2009-10-22 Kaz Kylheku <kkylheku@gmail.com>
+ Got "make install" working.
+
+ * Makefile (install): New target.
+
+ * configure (mandir, bindir): New variables.
+
+2009-10-22 Kaz Kylheku <kkylheku@gmail.com>
+
Got build to work in separate build directory.
* Makefile (CFLAGS): Added -I flag to point header inclusion to the
diff --git a/Makefile b/Makefile
index ffa9f2ac..5d62c327 100644
--- a/Makefile
+++ b/Makefile
@@ -73,6 +73,12 @@ tests/004/%: TXR_ARGS := -a 123 -b -c
%.expected: %.txr
./txr $(TXR_OPTS) $^ $(TXR_ARGS) > $@
+install: $(PROG)
+ mkdir -p $(install_prefix)$(bindir)
+ mkdir -p $(install_prefix)$(datadir)
+ mkdir -p $(install_prefix)$(mandir)/man1
+ cp txr $(install_prefix)$(bindir)
+ cp $(top_srcdir)/txr.1 $(install_prefix)$(mandir)/man1
config.make:
@echo "config.make missing: you didn't run ./configure"
diff --git a/configure b/configure
index 6847c85c..58753f41 100755
--- a/configure
+++ b/configure
@@ -98,7 +98,9 @@ done
prefix=${prefix-/usr/local}
install_prefix=${install_prefix-}
+bindir=${datadir-'$(prefix)/bin'}
datadir=${datadir-'$(prefix)/share/txr'}
+mandir=${mandir-'$(prefix)/share/man'}
cross=${cross-}
compiler_prefix=${compiler_prefix-}
cc=${compiler-'$(cross)$(compiler_prefix)gcc'}
@@ -169,11 +171,19 @@ install_prefix [$install_prefix]
Specifies an extra path prefix that will be prepended to all paths during
installation. This allows the software to be installed in a temporary
directory for packaging.
+
+bindir [$bindir]
+
+ Specifies where the program executable will be installed.
datadir [$datadir]
Specifies where read-only program data is to be stored.
+mandir [$mandir]
+
+ Specifies the directory where to install man pages.
+
cross
Specifies the root of a cross-compiling toolchain.
@@ -305,7 +315,7 @@ fi
printf "Checking installation paths:\n"
-for name in prefix datadir; do
+for name in prefix bindir datadir mandir; do
eval path="\$install_prefix\${$name}"
printf "\$(install_prefix)\$(%s)=%s ... " $name "$path"
test_access=y
@@ -420,12 +430,24 @@ prefix := $prefix
# e.g. for an operating system distro.
install_prefix := $install_prefix
-# read-only application data directory
+# executable directory
+bindir := $bindir
+
+# read-only data directory
datadir := $datadir
+# man page directory
+mandir := $mandir
+
+# cross compiler toolchain root directory
cross := $cross
+
+# prefix for compiler command
compiler_prefix := $compiler_prefix
+
+# prefix for non-compiler toolchain commands
tool_prefix := $tool_prefix
+
CC := $cc
LEX := $lex
LEXLIB := $lexlib
@@ -437,7 +459,6 @@ DIAG_FLAGS := $diag_flags
DBG_FLAGS := $debug_flags
LEX_DBG_FLAGS := $lex_dbg_flags
TXR_DBG_OPTS := $txr_dbg_opts
-
!
#