Commit b0940faa authored by Ben Collins's avatar Ben Collins
Browse files

Use the same man build setup as the devel branch so that TMPROOT builds

get the correct file and directory names sed'd into the man pages.
parent 19c16278
......@@ -7,14 +7,12 @@
##
MANDIR=$(mandir)/man$(MANSECT)
TMP_SUFFIX=tmp
install-common: FORCE
-$(MKDIR) -p $(MANDIR)
@TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \
VERSION=`$(CAT) $(VERSIONFILE)`; \
cd $(srcdir); \
for page in *.$(MANSECT); do \
$(SED) -e "s%LDVERSION%$$VERSION%" \
all-common:
PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
for page in $$PAGES; do \
$(SED) -e "s%LDVERSION%$(VERSION)%" \
-e 's%ETCDIR%$(sysconfdir)%' \
-e 's%LOCALSTATEDIR%$(localstatedir)%' \
-e 's%SYSCONFDIR%$(sysconfdir)%' \
......@@ -23,19 +21,26 @@ install-common: FORCE
-e 's%BINDIR%$(bindir)%' \
-e 's%LIBDIR%$(libdir)%' \
-e 's%LIBEXECDIR%$(libexecdir)%' \
$$page | $(MANCOMPRESS) > $$TMPMAN; \
$(srcdir)/$$page > $$page.$(TMP_SUFFIX); \
done
touch all-common
install-common:
-$(MKDIR) $(MANDIR)
PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
for page in $$PAGES; do \
echo "installing $(MANDIR)/$$page"; \
$(RM) $(MANDIR)/$$page $(MANDIR)/$$page$(MANCOMPRESSSUFFIX); \
$(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(MANDIR)/$$page$(MANCOMPRESSSUFFIX); \
if [ -f "$$page.links" ]; then \
for link in `$(CAT) $$page.links`; do \
$(RM) $(MANDIR)/$$page; \
$(INSTALL) $(INSTALLFLAGS) -m 644 $$page.$(TMP_SUFFIX) $(MANDIR)/$$page; \
if test -f "$(srcdir)/$$page.links" ; then \
for link in `$(CAT) $(srcdir)/$$page.links`; do \
echo "installing $(MANDIR)/$$link as link to $$page"; \
$(RM) $(MANDIR)/$$link $(MANDIR)/$$link$(MANCOMPRESSSUFFIX); \
$(LN_S) $$page$(MANCOMPRESSSUFFIX) $(MANDIR)/$$link$(MANCOMPRESSSUFFIX); \
$(LN_S) -f $$page $(MANDIR)/$$link; \
done; \
fi; \
done; \
$(RM) $$TMPMAN
done
Makefile: $(top_srcdir)/build/lib.mk
clean-common: FORCE
$(RM) *.tmp all-common
Makefile: $(top_srcdir)/build/man.mk
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment