$NetBSD: patch-aa,v 1.4 2003/11/10 23:15:21 dmcmahill Exp $

--- Makefile.orig	Fri Feb 15 15:47:09 2002
+++ Makefile
@@ -1,12 +1,12 @@
 ################## Configuration parameters
 # Compile using ocamlopt, to use ocamlc set TARGET=byte
-TARGET=opt
+#TARGET=opt
 # Library directory of hevea
-LIBDIR=/usr/local/lib/hevea
+LIBDIR=${PREFIX}/share/hevea
 # Where to install programms
-BINDIR=/usr/local/bin
+BINDIR=${PREFIX}/bin
 # A replacement for /lib/cpp
-CPP=gcc -E -P -x c
+#CPP=gcc -E -P -x c
 ############### End of configuration parameters
 SUF=
 #DIR=/usr/bin/
@@ -18,7 +18,7 @@ OCAMLFLAGS=
 OCAMLCI=${DIR}ocamlc$(SUF)
 OCAMLOPT=${DIR}ocamlopt$(SUF)
 OCAMLLEX=${DIR}ocamllex$(SUF)
-INSTALL=cp
+INSTALL=${BSD_INSTALL_DATA}
 
 ONLYESPONJA=emisc.cmo buff.cmo htmllex.cmo htmlparse.cmo htmltext.cmo pp.cmo util.cmo explode.cmo ultra.cmo esponja.cmo
 
@@ -46,30 +46,30 @@ byte:
 	$(MAKE) $(MFLAGS) TARGET=byte hevea.byte hacha.byte esponja.byte cutfoot-fra.html cutfoot-eng.html
 
 install-lib:
-	-mkdir $(LIBDIR)
-	$(INSTALL) hevea.sty cutfoot-fra.html cutfoot-eng.html footer.tex ${LIBDIR}
-	$(INSTALL) contents_motif.gif next_motif.gif previous_motif.gif ${LIBDIR}
-	$(INSTALL) $(ALLLIB) $(LIBDIR)
-	-mkdir  $(LIBDIR)/html
-	cd html ; $(INSTALL) $(HTMLLIB) $(LIBDIR)/html
-	-mkdir  $(LIBDIR)/text
-	cd text ; $(INSTALL) $(TEXTLIB) $(LIBDIR)/text
-	-mkdir $(LIBDIR)/info
-	cd info ; $(INSTALL) $(INFOLIB) $(LIBDIR)/info
+	$(BSD_INSTALL_DATA_DIR) $(LIBDIR)
+	$(BSD_INSTALL_DATA) hevea.sty cutfoot-fra.html cutfoot-eng.html footer.tex $(LIBDIR)
+	$(BSD_INSTALL_DATA) contents_motif.gif next_motif.gif previous_motif.gif $(LIBDIR)
+	$(BSD_INSTALL_DATA) $(ALLLIB) $(LIBDIR)
+	$(BSD_INSTALL_DATA_DIR) $(LIBDIR)/html
+	cd html ; $(BSD_INSTALL_DATA) $(HTMLLIB) $(LIBDIR)/html
+	$(BSD_INSTALL_DATA_DIR) $(LIBDIR)/text
+	cd text ; $(BSD_INSTALL_DATA) $(TEXTLIB) $(LIBDIR)/text
+	$(BSD_INSTALL_DATA_DIR) $(LIBDIR)/info
+	cd info ; $(BSD_INSTALL_DATA) $(INFOLIB) $(LIBDIR)/info
 
 
 
 install-opt: install-lib
-	$(INSTALL) hevea.opt $(BINDIR)/hevea
-	$(INSTALL) hacha.opt $(BINDIR)/hacha
-	$(INSTALL) esponja.opt $(BINDIR)/esponja
-	$(INSTALL) imagen $(BINDIR)
+	$(BSD_INSTALL_PROGRAM) hevea.opt $(BINDIR)/hevea
+	$(BSD_INSTALL_PROGRAM) hacha.opt $(BINDIR)/hacha
+	$(BSD_INSTALL_PROGRAM) esponja.opt $(BINDIR)/esponja
+	$(BSD_INSTALL_SCRIPT) imagen $(BINDIR)
 
 install-byte: install-lib
-	$(INSTALL) hevea.byte $(BINDIR)/hevea
-	$(INSTALL) hacha.byte $(BINDIR)/hacha
-	$(INSTALL) esponja.byte $(BINDIR)/esponja
-	$(INSTALL) imagen $(BINDIR)
+	$(BSD_INSTALL_SCRIPT) hevea.byte $(BINDIR)/hevea
+	$(BSD_INSTALL_SCRIPT) hacha.byte $(BINDIR)/hacha
+	$(BSD_INSTALL_SCRIPT) esponja.byte $(BINDIR)/esponja
+	$(BSD_INSTALL_SCRIPT) imagen $(BINDIR)
 
 
 hevea.byte: ${OBJS}
@@ -103,7 +103,7 @@ cutfoot-eng.html: cutfoot.tex html/hevea
 	HEVEADIR=. ; export HEVEADIR ; ${HEVEA} < cutfoot.tex | ${ESPONJA}> $@
 
 .SUFFIXES:
-.SUFFIXES: .ml .cmo .mli .cmi .c .mll .cmx 
+.SUFFIXES: .ml .cmo .mli .cmi .c .mll .cmx
 
 .mll.ml:
 	${OCAMLLEX} $<
@@ -128,7 +128,7 @@ clean: cleanbyte
 	rm -f *.byte *.opt
 	rm -f $(GENSRC)
 	rm -f *.o *.cmi *.cmo *.cmx *.o *.ppo *.ppi
-	rm -f *~ #*# html/*~ html/#*# text/*~ text/#*# info/*~ info/#*# 
+	rm -f *~ #*# html/*~ html/#*# text/*~ text/#*# info/*~ info/#*#
 	rm -f cutfoot-fra.html cutfoot-eng.html
 
 depend: $(GENSRC)
