1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1994 Regents of the University of Michigan.
5 # Redistribution and use in source and binary forms are permitted
6 # provided that this notice is preserved and that due credit is given
7 # to the University of Michigan at Ann Arbor. The name of the University
8 # may not be used to endorse or promote products derived from this
9 # software without specific prior written permission. This software
10 # is provided ``as is'' without express or implied warranty.
14 #-----------------------------------------------------------------------------
18 INSTDIR=$(LDAP_MANDIR)/man$(SECT)
19 VERSIONFILE = $(LDAPSRC)/build/version
24 -$(MKDIR) -p $(INSTDIR)
25 @TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \
26 VERSION=`$(CAT) $(VERSIONFILE)`; \
27 for page in *.$(SECT); do \
28 $(SED) -e "s%LDVERSION%$$VERSION%" \
29 -e 's%ETCDIR%$(LDAP_ETCDIR)%' \
30 -e 's%SBINDIR%$(LDAP_SBINDIR)%' \
31 -e 's%BINDIR%$(LDAP_BINDIR)%' \
32 -e 's%LIBEXECDIR%$(LDAP_LIBEXECDIR)%' \
33 $$page | $(MANCOMPRESS) > $$TMPMAN; \
34 echo "installing $(INSTDIR)/$$page"; \
35 $(RM) $(INSTDIR)/$$page $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX); \
36 $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX); \
37 if [ -f "$$page.links" ]; then \
38 for link in `$(CAT) $$page.links`; do \
39 echo "installing $(INSTDIR)/$$link as link to $$page"; \
40 $(RM) $(INSTDIR)/$$link $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX); \
41 ln -sf $$page$(MANCOMPRESSSUFFIX) $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX); \
56 @$(LN) .src/*.$(SECT) .src/*links .