2 ## Copyright 1998-2004 The OpenLDAP Foundation.
3 ## All rights reserved.
5 ## Redistribution and use in source and binary forms, with or without
6 ## modification, are permitted only as authorized by the OpenLDAP
9 ## A copy of this license is available in the file LICENSE in the
10 ## top-level directory of the distribution or, alternatively, at
11 ## <http://www.OpenLDAP.org/license.html>.
12 ##---------------------------------------------------------------------------
14 # Makefile Template for Manual Pages
17 MANDIR=$(mandir)/man$(MANSECT)
21 PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
22 for page in $$PAGES; do \
23 $(SED) -e "s%LDVERSION%$(VERSION)%" \
24 -e 's%ETCDIR%$(sysconfdir)%' \
25 -e 's%LOCALSTATEDIR%$(localstatedir)%' \
26 -e 's%SYSCONFDIR%$(sysconfdir)%' \
27 -e 's%DATADIR%$(datadir)%' \
28 -e 's%SBINDIR%$(sbindir)%' \
29 -e 's%BINDIR%$(bindir)%' \
30 -e 's%LIBDIR%$(libdir)%' \
31 -e 's%LIBEXECDIR%$(libexecdir)%' \
32 -e 's%RELEASEDATE%$(RELEASEDATE)%' \
33 $(srcdir)/$$page > $$page.$(TMP_SUFFIX); \
37 -$(MKDIR) $(DESTDIR)$(MANDIR)
38 PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
39 for page in $$PAGES; do \
40 echo "installing $(MANDIR)/$$page"; \
41 $(RM) $(DESTDIR)$(MANDIR)/$$page; \
42 $(INSTALL) $(INSTALLFLAGS) -m 644 $$page.$(TMP_SUFFIX) $(DESTDIR)$(MANDIR)/$$page; \
43 if test -f "$(srcdir)/$$page.links" ; then \
44 for link in `$(CAT) $(srcdir)/$$page.links`; do \
45 echo "installing $(MANDIR)/$$link as link to $$page"; \
46 $(RM) $(DESTDIR)$(MANDIR)/$$link ; \
47 $(LN_S) $$page $(DESTDIR)$(MANDIR)/$$link; \
53 $(RM) *.tmp all-common
55 Makefile: $(top_srcdir)/build/man.mk