openldap/build/man.mk

49 lines
1.4 KiB
Makefile
Raw Normal View History

1999-08-30 16:08:00 +08:00
# $OpenLDAP$
2003-01-04 04:20:47 +08:00
## Copyright 1998-2003 The OpenLDAP Foundation
1998-12-29 03:58:57 +08:00
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
## of this package for details.
1998-10-25 09:41:42 +08:00
##---------------------------------------------------------------------------
##
## Makefile Template for Manual Pages
##
MANDIR=$(mandir)/man$(MANSECT)
TMP_SUFFIX=tmp
1998-10-25 09:41:42 +08:00
1999-03-13 06:32:15 +08:00
all-common:
PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
for page in $$PAGES; do \
1999-04-30 02:28:57 +08:00
$(SED) -e "s%LDVERSION%$(VERSION)%" \
1998-10-25 09:41:42 +08:00
-e 's%ETCDIR%$(sysconfdir)%' \
-e 's%LOCALSTATEDIR%$(localstatedir)%' \
1998-10-25 09:41:42 +08:00
-e 's%SYSCONFDIR%$(sysconfdir)%' \
-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)%' \
$(srcdir)/$$page > $$page.$(TMP_SUFFIX); \
done
install-common:
-$(MKDIR) $(DESTDIR)$(MANDIR)
PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
for page in $$PAGES; do \
1998-10-25 09:41:42 +08:00
echo "installing $(MANDIR)/$$page"; \
$(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 \
for link in `$(CAT) $(srcdir)/$$page.links`; do \
1998-10-25 09:41:42 +08:00
echo "installing $(MANDIR)/$$link as link to $$page"; \
$(RM) $(DESTDIR)$(MANDIR)/$$link ; \
$(LN_S) $$page $(DESTDIR)$(MANDIR)/$$link; \
1998-10-25 09:41:42 +08:00
done; \
fi; \
done
1998-10-25 09:41:42 +08:00
clean-common: FORCE
$(RM) *.tmp all-common
Makefile: $(top_srcdir)/build/man.mk