openldap/doc/man/man3/Make-template

57 lines
1.8 KiB
Text
Raw Normal View History

1998-08-08 20:43:13 -04:00
#-----------------------------------------------------------------------------
# Copyright (c) 1994 Regents of the University of Michigan.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of Michigan at Ann Arbor. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
# LDAP man3 makefile
#
#-----------------------------------------------------------------------------
LDAPSRC= ../../..
SECT=3
INSTDIR=$(LDAP_MANDIR)/man$(SECT)
1998-08-08 20:43:13 -04:00
VERSIONFILE = $(LDAPSRC)/build/version
all: FORCE
install: FORCE
-$(MKDIR) -p $(INSTDIR)
@TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \
1998-08-08 20:43:13 -04:00
VERSION=`$(CAT) $(VERSIONFILE)`; \
for page in *.$(SECT); do \
$(SED) -e "s%LDVERSION%$$VERSION%" \
-e 's%ETCDIR%$(LDAP_ETCDIR)%' \
-e 's%SBINDIR%$(LDAP_SBINDIR)%' \
-e 's%BINDIR%$(LDAP_BINDIR)%' \
-e 's%LIBEXECDIR%$(LDAP_LIBEXECDIR)%' \
$$page | $(MANCOMPRESS) > $$TMPMAN; \
1998-08-08 20:43:13 -04:00
echo "installing $(INSTDIR)/$$page"; \
$(RM) $(INSTDIR)/$$page $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX); \
$(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page$(MANCOMPRESSSUFFIX); \
1998-08-08 20:43:13 -04:00
if [ -f "$$page.links" ]; then \
for link in `$(CAT) $$page.links`; do \
echo "installing $(INSTDIR)/$$link as link to $$page"; \
$(RM) $(INSTDIR)/$$link $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX); \
ln -sf $$page$(MANCOMPRESSSUFFIX) $(INSTDIR)/$$link$(MANCOMPRESSSUFFIX); \
1998-08-08 20:43:13 -04:00
done; \
fi; \
done; \
$(RM) $$TMPMAN
clean: FORCE
depend: FORCE
lint: FORCE
5lint: FORCE
links:
@$(LN) .src/*.$(SECT) .src/*links .