Add `make install' targets, and also version IDs on the man pages.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 21 Nov 2004 09:32:02 +0000 (09:32 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 21 Nov 2004 09:32:02 +0000 (09:32 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/utils@4856 cda61777-01e9-0310-a592-d414129be87e

Makefile
base64/Makefile
base64/base64.but
cvt-utf8/Makefile
cvt-utf8/cvt-utf8.but
multi/Makefile
multi/multi.but
xcopy/Makefile
xcopy/xcopy.but

index d5cb05a..284e519 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,13 @@
 SUBDIRS = base64 cvt-utf8 multi xcopy
+
+# for `make html' and `make release'; should be a relative path
 DESTDIR = .
 
+# for `make install'; should be absolute paths
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+MANDIR = $(PREFIX)/man/man1
+
 all:
        for i in $(SUBDIRS); do make -C $$i; done
 
@@ -13,3 +20,8 @@ html:
 
 release:
        for i in $(SUBDIRS); do make -C $$i release DESTDIR=../$(DESTDIR); done
+
+install:
+       for i in $(SUBDIRS); do \
+           make -C $$i install; \
+       done
index 2d31bcf..e174aa9 100644 (file)
@@ -1,5 +1,11 @@
+# for `make release' and `make html'
 DESTDIR = .
 
+# for `make install'
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+MANDIR = $(PREFIX)/man/man1
+
 all: base64.1 base64
 
 base64: base64.c
@@ -22,3 +28,9 @@ release: base64.1
        ln -s ../../Makefile reltmp/base64
        tar -C reltmp -chzf $(DESTDIR)/base64.tar.gz base64
        rm -rf reltmp
+
+install: base64 base64.1
+       mkdir -p $(BINDIR)
+       install base64 $(BINDIR)/base64
+       mkdir -p $(MANDIR)
+       install -m 0644 base64.1 $(MANDIR)/base64.1
index 1bce7aa..10c65f8 100644 (file)
@@ -76,3 +76,5 @@ parameter passed to \cw{-c} must be a multiple of 4.
 
 \cw{base64} is free software, distributed under the MIT licence.
 Type \cw{base64 --licence} to see the full licence text.
+
+\versionid $Id$
index 2098ff5..ead7b24 100644 (file)
@@ -1,5 +1,11 @@
+# for `make release' and `make html'
 DESTDIR = .
 
+# for `make install'
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+MANDIR = $(PREFIX)/man/man1
+
 all: cvt-utf8.1
 
 %.1: %.but
@@ -19,3 +25,9 @@ release: cvt-utf8.1
        ln -s ../../Makefile reltmp/cvt-utf8
        tar -C reltmp -chzf $(DESTDIR)/cvt-utf8.tar.gz cvt-utf8
        rm -rf reltmp
+
+install: cvt-utf8.1
+       mkdir -p $(BINDIR)
+       install cvt-utf8 $(BINDIR)/cvt-utf8
+       mkdir -p $(MANDIR)
+       install -m 0644 cvt-utf8.1 $(MANDIR)/cvt-utf8.1
index 3ee4832..5fe4d44 100644 (file)
@@ -189,3 +189,5 @@ perform the rest of its functions.
 
 \cw{cvt-utf8} is free software, distributed under the MIT licence.
 Type \cw{cvt-utf8 --licence} to see the full licence text.
+
+\versionid $Id$
index c38b40c..3b7f2d6 100644 (file)
@@ -1,5 +1,11 @@
+# for `make release' and `make html'
 DESTDIR = .
 
+# for `make install'
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+MANDIR = $(PREFIX)/man/man1
+
 all: multi.1
 
 %.1: %.but
@@ -19,3 +25,9 @@ release: multi.1
        ln -s ../../Makefile reltmp/multi
        tar -C reltmp -chzf $(DESTDIR)/multi.tar.gz multi
        rm -rf reltmp
+
+install: multi.1
+       mkdir -p $(BINDIR)
+       install multi $(BINDIR)/multi
+       mkdir -p $(MANDIR)
+       install -m 0644 multi.1 $(MANDIR)/multi.1
index 81fd1b6..2832e1d 100644 (file)
@@ -209,3 +209,5 @@ this basic idea, supplying more options and configurability.
 
 \cw{multi} is free software, distributed under the MIT licence. Type
 \cw{multi --licence} to see the full licence text.
+
+\versionid $Id$
index f13bcd1..cd5c7be 100644 (file)
@@ -1,5 +1,11 @@
+# for `make release' and `make html'
 DESTDIR = .
 
+# for `make install'
+PREFIX = /usr/local
+BINDIR = $(PREFIX)/bin
+MANDIR = $(PREFIX)/man/man1
+
 X11LIB=-L/usr/X11R6/lib -lX11
 
 all: xcopy.1 xcopy
@@ -25,4 +31,8 @@ release: xcopy.1
        tar -C reltmp -chzf $(DESTDIR)/xcopy.tar.gz xcopy
        rm -rf reltmp
 
-
+install: xcopy xcopy.1
+       mkdir -p $(BINDIR)
+       install xcopy $(BINDIR)/xcopy
+       mkdir -p $(MANDIR)
+       install -m 0644 xcopy.1 $(MANDIR)/xcopy.1
index 1be9e0c..b6d1384 100644 (file)
@@ -107,3 +107,5 @@ which they could have converted).
 
 \cw{xcopy} is free software, distributed under the MIT licence. Type
 \cw{xcopy --licence} to see the full licence text.
+
+\versionid $Id$