summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-06-02 19:40:49 +0000
committerSimon Tatham <anakin@pobox.com>2004-06-02 19:40:49 +0000
commit419379c9653fdb6c4974a8579d1a8918cc5d7e53 (patch)
tree60f964437bcfbf96d18ce58727c0c9b363d4a805 /Makefile
parentacc2deba308bb4746d5a48f5b19f5a40b63f0cdd (diff)
downloadhalibut-419379c9653fdb6c4974a8579d1a8918cc5d7e53.zip
halibut-419379c9653fdb6c4974a8579d1a8918cc5d7e53.tar.gz
halibut-419379c9653fdb6c4974a8579d1a8918cc5d7e53.tar.bz2
halibut-419379c9653fdb6c4974a8579d1a8918cc5d7e53.tar.xz
rjk's `make install' patch.
[originally from svn r4267]
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 719e9b4..fd6f932 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,11 @@
# - the Makefile uses GNU ifdef / ifndef commands and GNU make `%'
# pattern rules
+prefix=/usr/local
+exec_prefix=$(prefix)
+bindir=$(exec_prefix)/bin
+INSTALL=install -c
+
ifdef RELEASE
ifndef VERSION
VERSION := $(RELEASE)
@@ -35,9 +40,9 @@ BUILDDIR := build
endif
endif
-all:
+all install:
@test -d $(BUILDDIR) || mkdir $(BUILDDIR)
- @make -C $(BUILDDIR) -f ../Makefile REALBUILD=yes
+ @make -C $(BUILDDIR) -f ../Makefile $@ REALBUILD=yes
spotless: topclean
@test -d $(BUILDDIR) || mkdir $(BUILDDIR)
@@ -96,7 +101,7 @@ else
VDEF = `(cd $(SRC); md5sum -c manifest && cat version)`
endif
-halibut:
+all: halibut
SRC := ../
@@ -131,6 +136,10 @@ spotless:: clean
clean::
rm -f *.o halibut core
+install:
+ $(INSTALL) -m 755 halibut $(bindir)/halibut
+ $(MAKE) -C ../doc install prefix="$(prefix)" INSTALL="$(INSTALL)"
+
FORCE: # phony target to force version.o to be rebuilt every time
-include $(DEPS)