$OpenBSD: patch-texk_web2c_alephdir_aleph_mk,v 1.1.1.1 2007/07/17 21:53:28 jasper Exp $
--- texk/web2c/alephdir/aleph.mk.orig	Tue Jan 17 21:41:51 2006
+++ texk/web2c/alephdir/aleph.mk	Fri May  4 20:28:39 2007
@@ -142,7 +142,7 @@ afmts: $(all_afmts)
 
 afmtdir = $(web2cdir)/aleph
 $(afmtdir)::
-	$(SHELL) $(top_srcdir)/../mkinstalldirs $(afmtdir)
+	$(SHELL) $(top_srcdir)/../mkinstalldirs ${DESTDIR}$(afmtdir)
 
 aleph.fmt: aleph
 	$(dumpenv) $(MAKE) progname=aleph files="omega.ini" prereq-check
@@ -161,7 +161,7 @@ install-aleph-dumps: install-aleph-fmts
 # The actual binary executables and pool files.
 install-programs: @ALEPH@ install-aleph-programs
 install-aleph-programs: aleph $(bindir)
-	for p in aleph; do $(INSTALL_LIBTOOL_PROG) $$p $(bindir); done
+	for p in aleph; do $(INSTALL_LIBTOOL_PROG) $$p ${DESTDIR}$(bindir); done
 
 install-links: @ALEPH@ install-aleph-links
 install-aleph-links: install-aleph-programs
@@ -171,14 +171,14 @@ install-aleph-links: install-aleph-programs
 install-fmts: @ALEPH@ install-aleph-fmts
 install-aleph-fmts: afmts $(afmtdir)
 	afmts="$(all_afmts)"; \
-	  for f in $$afmts; do $(INSTALL_DATA) $$f $(afmtdir)/$$f; done
+	  for f in $$afmts; do $(INSTALL_DATA) $$f ${DESTDIR}$(afmtdir)/$$f; done
 	afmts="$(afmts)"; \
 	  for f in $$afmts; do base=`basename $$f .fmt`; \
-	    (cd $(bindir) && (rm -f $$base; $(LN) aleph $$base)); done
+	    (cd ${DESTDIR}$(bindir) && (rm -f $$base; $(LN) aleph $$base)); done
 
 # Auxiliary files.
 install-data:: @ALEPH@ install-aleph-data
 install-aleph-pool: aleph.pool $(texpooldir)
-	$(INSTALL_DATA) aleph.pool $(texpooldir)/aleph.pool
+	$(INSTALL_DATA) aleph.pool ${DESTDIR}$(texpooldir)/aleph.pool
 
 # end of aleph.mk
