]> git.sur5r.net Git - openldap/blob - doc/man/man8/Make-template
Added LIBEXECDIR, SBINDIR and patched install rules and files as needed.
[openldap] / doc / man / man8 / 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 man8 makefile
13 #
14 #-----------------------------------------------------------------------------
15
16 LDAPSRC= ../../..
17 SECT=8
18 INSTDIR=$(MANDIR)/man$(SECT)
19 VERSIONFILE = $(LDAPSRC)/build/version
20
21 all:    FORCE
22
23 install:        FORCE
24         -$(MKDIR) -p $(INSTDIR)
25         @TMPMAN=/tmp/ldapman.$$$$; \
26         VERSION=`$(CAT) $(VERSIONFILE)`; \
27         for page in *.$(SECT); do \
28             $(SED) -e "s%LDVERSION%$$VERSION%" \
29                         -e 's%ETCDIR%$(RUNTIMEETCDIR)%' \
30                         -e 's%SBINDIR%$(SBINDIR)%' \
31                         -e 's%BINDIR%$(BINDIR)%' \
32                         -e 's%LIBEXECDIR%$(LIBEXECDIR)%' \
33                     $$page > $$TMPMAN; \
34             echo "installing $(INSTDIR)/$$page"; \
35             $(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(INSTDIR)/$$page; \
36             if [ -f "$$page.links" ]; then \
37                 for link in `$(CAT) $$page.links`; do \
38                     echo "installing $(INSTDIR)/$$link as link to $$page"; \
39                     ln -sf $$page.gz $(INSTDIR)/$$link.gz; \
40                 done; \
41             fi; \
42         done; \
43         $(RM) $$TMPMAN
44
45 clean:  FORCE
46
47 depend: FORCE
48
49 lint:   FORCE
50
51 5lint:  FORCE
52
53 links:
54         @$(LN) .src/*.$(SECT) .src/*links .