diff -Nur sks-1.0.9/Makefile sks-1.0.9.instvars/Makefile --- sks-1.0.9/Makefile 2004-10-21 04:55:40.000000000 +0200 +++ sks-1.0.9.instvars/Makefile 2005-03-05 17:10:12.736801160 +0100 @@ -29,9 +29,6 @@ ifndef CAMLP4O CAMLP4O=camlp4o endif -ifndef MANDIR - MANDIR=/usr/share/man -endif export OCAMLC export OCAMLOPT @@ -42,6 +39,41 @@ ifndef PREFIX PREFIX=/usr/local endif +ifndef prefix + prefix=$(PREFIX) +endif +ifndef exec_prefix + exec_prefix=$(prefix) +endif +ifndef datarootdir + datarootdir=$(prefix)/share +endif +ifndef bindir + bindir=$(exec_prefix)/bin +endif +ifndef MANDIR + MANDIR=$(datarootdir)/man +endif +ifndef mandir + mandir=$(mandir) +endif +ifndef man8dir + man8dir=$(mandir)/man8 +endif +ifndef man8ext + man8ext=.8 +endif + +ifndef INSTALL + INSTALL=install +endif +ifndef INSTALL_PROGRAM + INSTALL_PROGRAM=$(INSTALL) +endif +ifndef INSTALL_DATA + INSTALL_DATA=$(INSTALL) -m 0644 +endif + ifeq ($(BDBLIB),) OCAMLLIB= else @@ -57,7 +89,8 @@ OCAMLOPTFLAGS=$(COMMONCAMLFLAGS) -inline 40 $(CAMLLIBS:.cma=.cmxa) EXE=sks sks_add_mail -ALL=$(EXE) +MAN=sks$(man8ext).gz +ALL=$(EXE) $(MAN) ALL.bc=$(EXE:=.bc) all: $(ALL) @@ -126,13 +159,17 @@ # Special targets -install: - install sks_build.sh sks sks_add_mail $(PREFIX)/bin - install sks.8.gz $(MANDIR)/man8 - -install.bc: - install sks_build.bc.sh sks.bc sks_add_mail.bc $(PREFIX)/bin - install sks.8.gz $(MANDIR)/man8 +install: all + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) sks_build.sh sks sks_add_mail $(DESTDIR)$(bindir) + $(INSTALL_DATA) -d $(DESTDIR)$(man8dir) + $(INSTALL_DATA) sks$(man8ext).gz $(DESTDIR)$(man8dir) + +install.bc: all.bc + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) sks_build.bc.sh sks sks_add_mail.bc $(DESTDIR)$(bindir) + $(INSTALL_DATA) -d $(DESTDIR)$(man8dir) + $(INSTALL_DATA) sks$(man8ext).gz $(DESTDIR)$(man8dir) Makefile.local: touch Makefile.local @@ -144,11 +181,11 @@ # Ordinary targets -sks.8.gz: sks.8 - gzip -f sks.8 +sks$(man8ext).gz: sks$(man8ext) + gzip -c $< > $@ -sks.8: sks.pod - pod2man -c "SKS OpenPGP Key server" --section 8 -r 0.1 -name sks sks.pod sks.8 +sks$(man8ext): sks.pod + pod2man -c "SKS OpenPGP Key server" --section 8 -r 0.1 -name sks sks.pod $@ sks: $(LIBS) $(ALLOBJS) sks.cmx $(OCAMLOPT) -o sks $(OCAMLOPTFLAGS) $(ALLOBJS) sks.cmx @@ -239,7 +276,7 @@ sks/.depend sks/*.tar.gz \ sks/bdb/Makefile sks/bdb/*.ml sks/bdb/*.mli sks/bdb/*.c \ sks/bdb/*.h sks/README sks/COPYING sks/VERSION sks/FILES \ - sks/Makefile.local.unused sks/sks.8 + sks/Makefile.local.unused sks/sks$(man8ext) ################################## # LIBS