Ooh, and make links to . and .. work properly as well.
[sgt/utils] / xcopy / Makefile
index 3284f80..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
@@ -22,7 +28,11 @@ release: xcopy.1
        ln -s ../../xcopy.1 reltmp/xcopy
        ln -s ../../xcopy.but reltmp/xcopy
        ln -s ../../Makefile reltmp/xcopy
-       tar -C reltmp -chzvf $(DESTDIR)/xcopy.tar.gz xcopy
+       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