2 ## Copyright 1998-2002 The OpenLDAP Foundation
3 ## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
4 ## of this package for details.
5 ##---------------------------------------------------------------------------
7 ## Makefile Template for Manual Pages
10 MANDIR=$(mandir)/man$(MANSECT)
14 PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
15 for page in $$PAGES; do \
16 $(SED) -e "s%LDVERSION%$(VERSION)%" \
17 -e 's%ETCDIR%$(sysconfdir)%' \
18 -e 's%LOCALSTATEDIR%$(localstatedir)%' \
19 -e 's%SYSCONFDIR%$(sysconfdir)%' \
20 -e 's%DATADIR%$(datadir)%' \
21 -e 's%SBINDIR%$(sbindir)%' \
22 -e 's%BINDIR%$(bindir)%' \
23 -e 's%LIBDIR%$(libdir)%' \
24 -e 's%LIBEXECDIR%$(libexecdir)%' \
25 -e 's%RELEASEDATE%$(RELEASEDATE)%' \
26 $(srcdir)/$$page > $$page.$(TMP_SUFFIX); \
30 -$(MKDIR) $(DESTDIR)$(MANDIR)
31 PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
32 for page in $$PAGES; do \
33 echo "installing $(MANDIR)/$$page"; \
34 $(RM) $(DESTDIR)$(MANDIR)/$$page; \
35 $(INSTALL) $(INSTALLFLAGS) -m 644 $$page.$(TMP_SUFFIX) $(DESTDIR)$(MANDIR)/$$page; \
36 if test -f "$(srcdir)/$$page.links" ; then \
37 for link in `$(CAT) $(srcdir)/$$page.links`; do \
38 echo "installing $(MANDIR)/$$link as link to $$page"; \
39 $(RM) $(DESTDIR)$(MANDIR)/$$link ; \
40 $(LN_S) $$page $(DESTDIR)$(MANDIR)/$$link; \
46 $(RM) *.tmp all-common
48 Makefile: $(top_srcdir)/build/man.mk