Skip to content

Commit

Permalink
contrib/lastmod: install man page
Browse files Browse the repository at this point in the history
Update lastmod's Makefile to install the manual page too.
  • Loading branch information
marschap committed Jul 26, 2015
1 parent 3b417c9 commit 9902b56
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion contrib/slapd-modules/lastmod/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap_r/libldap_r.la \
$(LDAP_BUILD)/libraries/liblber/liblber.la

LIBTOOL = $(LDAP_BUILD)/libtool
INSTALL = /usr/bin/install
CC = gcc
OPT = -g -O2 -Wall
DEFS = -DSLAPD_OVER_LASTMOD=SLAPD_MOD_DYNAMIC
INCS = $(LDAP_INC)
LIBS = $(LDAP_LIB)

PROGRAMS = lastmod.la
MANPAGES = slapo-lastmod.5
LTVER = 0:0:0

prefix=/usr/local
Expand All @@ -23,6 +25,8 @@ ldap_subdir=/openldap
libdir=$(exec_prefix)/lib
libexecdir=$(exec_prefix)/libexec
moduledir = $(libexecdir)$(ldap_subdir)
mandir = $(exec_prefix)/share/man
man5dir = $(mandir)/man5

.SUFFIXES: .c .o .lo

Expand All @@ -38,10 +42,17 @@ lastmod.la: lastmod.lo
clean:
rm -rf *.o *.lo *.la .libs

install: $(PROGRAMS)
install: install-lib install-man FORCE

install-lib: $(PROGRAMS)
mkdir -p $(DESTDIR)$(moduledir)
for p in $(PROGRAMS) ; do \
$(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(moduledir) ; \
done

install-man: $(MANPAGES)
mkdir -p $(DESTDIR)$(man5dir)
$(INSTALL) -m 644 $(MANPAGES) $(DESTDIR)$(man5dir)

FORCE:

0 comments on commit 9902b56

Please sign in to comment.