1 # $OpenLDAP: pkg/ldap/build/man.mk,v 1.32.2.4 2008/02/11 23:26:37 kurt Exp $
2 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 ## Copyright 1998-2008 The OpenLDAP Foundation.
5 ## All rights reserved.
7 ## Redistribution and use in source and binary forms, with or without
8 ## modification, are permitted only as authorized by the OpenLDAP
11 ## A copy of this license is available in the file LICENSE in the
12 ## top-level directory of the distribution or, alternatively, at
13 ## <http://www.OpenLDAP.org/license.html>.
14 ##---------------------------------------------------------------------------
16 # Makefile Template for Manual Pages
19 MANDIR
=$(mandir)/man
$(MANSECT
)
23 PAGES
=`cd $(srcdir); echo *.$(MANSECT)`; \
24 for page in
$$PAGES; do \
25 $(SED
) -e
"s%LDVERSION%$(VERSION)%" \
26 -e
's%ETCDIR%$(sysconfdir)%g' \
27 -e
's%LOCALSTATEDIR%$(localstatedir)%' \
28 -e
's%SYSCONFDIR%$(sysconfdir)%' \
29 -e
's%DATADIR%$(datadir)%' \
30 -e
's%SBINDIR%$(sbindir)%' \
31 -e
's%BINDIR%$(bindir)%' \
32 -e
's%LIBDIR%$(libdir)%' \
33 -e
's%LIBEXECDIR%$(libexecdir)%' \
34 -e
's%RELEASEDATE%$(RELEASEDATE)%' \
36 |
(cd
$(srcdir); $(SOELIM
) -) > $$page.
$(TMP_SUFFIX
); \
40 -$(MKDIR
) $(DESTDIR
)$(MANDIR
)
41 PAGES
=`cd $(srcdir); echo *.$(MANSECT)`; \
42 for page in
$$PAGES; do \
43 echo
"installing $$page in $(DESTDIR)$(MANDIR)"; \
44 $(RM
) $(DESTDIR
)$(MANDIR
)/$$page; \
45 $(INSTALL
) $(INSTALLFLAGS
) -m
644 $$page.
$(TMP_SUFFIX
) $(DESTDIR
)$(MANDIR
)/$$page; \
46 if
test -f
"$(srcdir)/$$page.links" ; then \
47 for link in
`$(CAT) $(srcdir)/$$page.links`; do \
48 echo
"installing $$link in $(DESTDIR)$(MANDIR) as link to $$page"; \
49 $(RM
) $(DESTDIR
)$(MANDIR
)/$$link ; \
50 $(LN_S
) $(DESTDIR
)$(MANDIR
)/$$page $(DESTDIR
)$(MANDIR
)/$$link; \
56 $(RM
) *.tmp all-common
58 Makefile
: $(top_srcdir
)/build
/man.mk