51 lines
1.9 KiB
Plaintext
51 lines
1.9 KiB
Plaintext
$NetBSD: patch-Makefile,v 1.3 2016/05/06 11:51:47 jaapb Exp $
|
|
|
|
Use correct install locations and BSD_INSTALL_*
|
|
--- Makefile.orig 2016-03-03 10:30:08.000000000 +0000
|
|
+++ Makefile
|
|
@@ -45,10 +45,10 @@ endif
|
|
# These may be overridden from outside; e.g., our opam package description
|
|
# provides its own values of docdir, libdir, and mandir.
|
|
|
|
-bindir := $(PREFIX)/bin
|
|
-docdir := $(PREFIX)/share/doc/menhir
|
|
-libdir := $(PREFIX)/share/menhir
|
|
-mandir := $(PREFIX)/share/man/man1
|
|
+bindir := $(DESTDIR)$(PREFIX)/bin
|
|
+docdir := $(DESTDIR)$(PREFIX)/share/doc/menhir
|
|
+libdir := $(DESTDIR)$(PREFIX)/share/menhir
|
|
+mandir := $(DESTDIR)$(PREFIX)/man/man1
|
|
MANS := menhir.1
|
|
DOCS := manual.pdf demos
|
|
MLYLIB := src/standard.mly
|
|
@@ -164,22 +164,22 @@ endif
|
|
|
|
install:
|
|
# Install the executable.
|
|
- mkdir -p $(bindir)
|
|
- install $(BUILDDIR)/menhir.$(TARGET) $(bindir)/$(MENHIREXE)
|
|
+ $(BSD_INSTALL_PROGRAM_DIR) $(bindir)
|
|
+ $(BSD_INSTALL_PROGRAM) $(BUILDDIR)/menhir.$(TARGET) $(bindir)/$(MENHIREXE)
|
|
# Install the library.
|
|
- mkdir -p $(libdir)
|
|
- install -m 644 $(MLYLIB) $(libdir)
|
|
+ $(BSD_INSTALL_LIB_DIR) $(libdir)
|
|
+ $(BSD_INSTALL_DATA) -m 644 $(MLYLIB) $(libdir)
|
|
@if `$(BUILDDIR)/menhir.$(TARGET) --suggest-ocamlfind` ; then \
|
|
echo Installing MenhirLib via ocamlfind. ; \
|
|
ocamlfind install menhirLib src/META $(patsubst %,$(BUILDDIR)/%,$(MENHIRLIB)) ; \
|
|
else \
|
|
echo Installing MenhirLib manually. ; \
|
|
- install -m 644 $(patsubst %,$(BUILDDIR)/%,$(MENHIRLIB)) $(libdir) ; \
|
|
+ $(BSD_INSTALL_DATA) -m 644 $(patsubst %,$(BUILDDIR)/%,$(MENHIRLIB)) $(libdir) ; \
|
|
fi
|
|
# Install the documentation, if it has been built.
|
|
if [ -f manual.pdf ] ; then \
|
|
- mkdir -p $(docdir) ; \
|
|
- mkdir -p $(mandir) ; \
|
|
+ $(BSD_INSTALL_DATA_DIR) $(docdir) ; \
|
|
+ $(BSD_INSTALL_MAN_DIR) $(mandir) ; \
|
|
cp -r $(DOCS) $(docdir) ; \
|
|
cp -r $(MANS) $(mandir) ; \
|
|
fi
|