--- 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)