slapo-autogroup: update Makefile to install manpage

This commit is contained in:
Howard Chu 2024-02-22 14:53:28 +00:00
parent ae1c8f1825
commit f12b369513

View File

@ -1,4 +1,14 @@
# $OpenLDAP$
# Copyright 2007 Howard Chu <hyc@symas.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted only as authorized by the OpenLDAP
# Public License.
#
# A copy of this license is available in the file LICENSE in the
# top-level directory of the distribution or, alternatively, at
# <http://www.OpenLDAP.org/license.html>.
LDAP_SRC = ../../..
LDAP_BUILD = $(LDAP_SRC)
@ -12,6 +22,7 @@ NT_LDFLAGS = -no-undefined -avoid-version
UNIX_LDFLAGS = -version-info $(LTVER)
LIBTOOL = $(LDAP_BUILD)/libtool
INSTALL = /usr/bin/install
CC = gcc
OPT = -g -O2
DEFS =
@ -20,6 +31,7 @@ LIBS = $($(PLAT)_LIB) $(LDAP_LIB)
LD_FLAGS = $(LDFLAGS) $($(PLAT)_LDFLAGS) -rpath $(moduledir) -module
PROGRAMS = autogroup.la
MANPAGES = slapo-autogroup.5
LTVER = 0:0:0
prefix=/usr/local
@ -29,6 +41,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
@ -43,9 +57,17 @@ autogroup.la: autogroup.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:
mkdir -p $(DESTDIR)$(man5dir)
$(INSTALL) -m 644 $(MANPAGES) $(DESTDIR)$(man5dir)
FORCE: