From 1166ff629163edfcf817a033d581439a21240bc4 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 21 Nov 2004 09:32:02 +0000 Subject: [PATCH] Add `make install' targets, and also version IDs on the man pages. git-svn-id: svn://svn.tartarus.org/sgt/utils@4856 cda61777-01e9-0310-a592-d414129be87e --- Makefile | 12 ++++++++++++ base64/Makefile | 12 ++++++++++++ base64/base64.but | 2 ++ cvt-utf8/Makefile | 12 ++++++++++++ cvt-utf8/cvt-utf8.but | 2 ++ multi/Makefile | 12 ++++++++++++ multi/multi.but | 2 ++ xcopy/Makefile | 12 +++++++++++- xcopy/xcopy.but | 2 ++ 9 files changed, 67 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d5cb05a..284e519 100644 --- 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 diff --git a/base64/Makefile b/base64/Makefile index 2d31bcf..e174aa9 100644 --- a/base64/Makefile +++ b/base64/Makefile @@ -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 diff --git a/base64/base64.but b/base64/base64.but index 1bce7aa..10c65f8 100644 --- a/base64/base64.but +++ b/base64/base64.but @@ -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$ diff --git a/cvt-utf8/Makefile b/cvt-utf8/Makefile index 2098ff5..ead7b24 100644 --- a/cvt-utf8/Makefile +++ b/cvt-utf8/Makefile @@ -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 diff --git a/cvt-utf8/cvt-utf8.but b/cvt-utf8/cvt-utf8.but index 3ee4832..5fe4d44 100644 --- a/cvt-utf8/cvt-utf8.but +++ b/cvt-utf8/cvt-utf8.but @@ -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$ diff --git a/multi/Makefile b/multi/Makefile index c38b40c..3b7f2d6 100644 --- a/multi/Makefile +++ b/multi/Makefile @@ -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 diff --git a/multi/multi.but b/multi/multi.but index 81fd1b6..2832e1d 100644 --- a/multi/multi.but +++ b/multi/multi.but @@ -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$ diff --git a/xcopy/Makefile b/xcopy/Makefile index f13bcd1..cd5c7be 100644 --- a/xcopy/Makefile +++ b/xcopy/Makefile @@ -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 diff --git a/xcopy/xcopy.but b/xcopy/xcopy.but index 1be9e0c..b6d1384 100644 --- a/xcopy/xcopy.but +++ b/xcopy/xcopy.but @@ -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$ -- 2.11.0