freebsd-ports/devel/menhir/files/patch-Makefile
Renato Botelho 2666b54c71 - Update to 20080912
PR:		ports/132061
Submitted by:	maintainer
2009-02-25 16:58:25 +00:00

40 lines
1.1 KiB
Text

--- Makefile.orig 2008-09-12 13:58:19.000000000 +0200
+++ Makefile 2009-02-24 14:36:26.000000000 +0100
@@ -28,10 +28,10 @@
$(error Please define PREFIX)
endif
-bindir := ${PREFIX}/bin
-docdir := ${PREFIX}/share/doc/menhir
-libdir := ${PREFIX}/share/menhir
-mandir := ${PREFIX}/share/man/man1
+bindir ?= ${PREFIX}/bin
+docdir ?= ${PREFIX}/share/doc/menhir
+libdir ?= ${PREFIX}/share/menhir
+mandir ?= ${PREFIX}/share/man/man1
MANS := menhir.1
DOCS := manual.pdf demos
MLYLIB := src/standard.mly
@@ -64,11 +64,9 @@
install: src/menhir
mkdir -p $(bindir)
mkdir -p $(libdir)
- mkdir -p $(docdir)
mkdir -p $(mandir)
install src/menhir $(bindir)
install -m 644 $(MLYLIB) $(libdir)
- cp -r $(DOCS) $(docdir)
cp -r $(MANS) $(mandir)
@cd src && if $(USE_OCAMLFIND) ; then \
echo Installing MenhirLib via ocamlfind. ; \
@@ -78,6 +76,10 @@
install -m 644 $(MENHIRLIB) $(libdir) ; \
fi
+docinstall:
+ mkdir -p $(docdir)
+ cp -r $(DOCS) $(docdir)
+
uninstall:
rm -rf $(bindir)/menhir
rm -rf $(libdir)