1999-08-30 16:08:00 +08:00
|
|
|
# $OpenLDAP$
|
2005-01-22 03:38:13 +08:00
|
|
|
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
|
|
|
##
|
2008-01-08 08:19:56 +08:00
|
|
|
## Copyright 1998-2008 The OpenLDAP Foundation.
|
2003-11-26 10:58:56 +08:00
|
|
|
## All rights reserved.
|
1998-10-25 09:41:42 +08:00
|
|
|
##
|
2003-11-26 10:58:56 +08:00
|
|
|
## Redistribution and use in source and binary forms, with or without
|
|
|
|
## modification, are permitted only as authorized by the OpenLDAP
|
|
|
|
## Public License.
|
1998-10-25 09:41:42 +08:00
|
|
|
##
|
2003-11-26 10:58:56 +08:00
|
|
|
## 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>.
|
|
|
|
##---------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Makefile Template for Manual Pages
|
|
|
|
#
|
1998-10-25 09:41:42 +08:00
|
|
|
|
|
|
|
MANDIR=$(mandir)/man$(MANSECT)
|
1999-03-01 00:10:37 +08:00
|
|
|
TMP_SUFFIX=tmp
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-03-13 06:32:15 +08:00
|
|
|
all-common:
|
1999-03-03 04:23:37 +08:00
|
|
|
PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
|
|
|
|
for page in $$PAGES; do \
|
1999-04-30 02:28:57 +08:00
|
|
|
$(SED) -e "s%LDVERSION%$(VERSION)%" \
|
2007-11-09 11:56:26 +08:00
|
|
|
-e 's%ETCDIR%$(sysconfdir)%g' \
|
1999-01-08 17:59:09 +08:00
|
|
|
-e 's%LOCALSTATEDIR%$(localstatedir)%' \
|
1998-10-25 09:41:42 +08:00
|
|
|
-e 's%SYSCONFDIR%$(sysconfdir)%' \
|
1998-11-30 03:48:28 +08:00
|
|
|
-e 's%DATADIR%$(datadir)%' \
|
1998-10-25 09:41:42 +08:00
|
|
|
-e 's%SBINDIR%$(sbindir)%' \
|
|
|
|
-e 's%BINDIR%$(bindir)%' \
|
|
|
|
-e 's%LIBDIR%$(libdir)%' \
|
|
|
|
-e 's%LIBEXECDIR%$(libexecdir)%' \
|
2002-06-13 11:59:10 +08:00
|
|
|
-e 's%RELEASEDATE%$(RELEASEDATE)%' \
|
2007-01-03 04:25:16 +08:00
|
|
|
$(srcdir)/$$page \
|
2007-02-01 18:58:40 +08:00
|
|
|
| (cd $(srcdir); $(SOELIM) -) > $$page.$(TMP_SUFFIX); \
|
1999-03-01 00:10:37 +08:00
|
|
|
done
|
|
|
|
|
|
|
|
install-common:
|
1999-09-23 05:51:30 +08:00
|
|
|
-$(MKDIR) $(DESTDIR)$(MANDIR)
|
1999-03-03 04:23:37 +08:00
|
|
|
PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
|
|
|
|
for page in $$PAGES; do \
|
2005-08-13 23:22:09 +08:00
|
|
|
echo "installing $$page in $(DESTDIR)$(MANDIR)"; \
|
1999-09-23 05:51:30 +08:00
|
|
|
$(RM) $(DESTDIR)$(MANDIR)/$$page; \
|
|
|
|
$(INSTALL) $(INSTALLFLAGS) -m 644 $$page.$(TMP_SUFFIX) $(DESTDIR)$(MANDIR)/$$page; \
|
1999-04-21 14:09:19 +08:00
|
|
|
if test -f "$(srcdir)/$$page.links" ; then \
|
1999-03-03 04:23:37 +08:00
|
|
|
for link in `$(CAT) $(srcdir)/$$page.links`; do \
|
2005-08-13 23:22:09 +08:00
|
|
|
echo "installing $$link in $(DESTDIR)$(MANDIR) as link to $$page"; \
|
1999-09-23 05:51:30 +08:00
|
|
|
$(RM) $(DESTDIR)$(MANDIR)/$$link ; \
|
2005-08-13 05:14:32 +08:00
|
|
|
$(LN_S) $(DESTDIR)$(MANDIR)/$$page $(DESTDIR)$(MANDIR)/$$link; \
|
1998-10-25 09:41:42 +08:00
|
|
|
done; \
|
|
|
|
fi; \
|
1999-03-01 02:47:07 +08:00
|
|
|
done
|
1998-10-25 09:41:42 +08:00
|
|
|
|
1999-03-01 01:08:54 +08:00
|
|
|
clean-common: FORCE
|
|
|
|
$(RM) *.tmp all-common
|
|
|
|
|
|
|
|
Makefile: $(top_srcdir)/build/man.mk
|