]> git.sur5r.net Git - openldap/blob - doc/man/man5/Make-template
Modified build environment to correctly support bin,sbin,libexec,etc
[openldap] / doc / man / man5 / Make-template
1 #-----------------------------------------------------------------------------
2 # Copyright (c) 1994 Regents of the University of Michigan.
3 # All rights reserved.
4 #
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.
11 #
12 #       LDAP man5 makefile
13 #
14 #-----------------------------------------------------------------------------
15
16 LDAPSRC= ../../..
17 SECT=5
18 INSTDIR=$(LDAP_MANDIR)/man$(SECT)
19 VERSIONFILE = $(LDAPSRC)/build/version
20
21 all:    FORCE
22
23 install:        FORCE
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); \
42                 done; \
43             fi; \
44         done; \
45         $(RM) $$TMPMAN
46
47 clean:  FORCE
48
49 depend: FORCE
50
51 lint:   FORCE
52
53 5lint:  FORCE
54
55 links:
56         @$(LN) .src/*.$(SECT) .src/*links .