mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
Moved man page generation to the build cycle instead of install
This commit is contained in:
parent
b14d7b35ed
commit
f02ef6773a
22
build/man.mk
22
build/man.mk
@ -7,10 +7,9 @@
|
||||
##
|
||||
|
||||
MANDIR=$(mandir)/man$(MANSECT)
|
||||
TMP_SUFFIX=tmp
|
||||
|
||||
install-common: FORCE
|
||||
-$(MKDIR) -p $(MANDIR)
|
||||
@TMPMAN=/tmp/ldapman.$$$$$(MANCOMPRESSSUFFIX); \
|
||||
all-common: FORCE
|
||||
VERSION=`$(CAT) $(VERSIONFILE)`; \
|
||||
cd $(srcdir); \
|
||||
for page in *.$(MANSECT); do \
|
||||
@ -23,19 +22,24 @@ install-common: FORCE
|
||||
-e 's%BINDIR%$(bindir)%' \
|
||||
-e 's%LIBDIR%$(libdir)%' \
|
||||
-e 's%LIBEXECDIR%$(libexecdir)%' \
|
||||
$$page | $(MANCOMPRESS) > $$TMPMAN; \
|
||||
$$page > $$page.$(TMP_SUFFIX); \
|
||||
done
|
||||
touch all-common
|
||||
|
||||
install-common:
|
||||
-$(MKDIR) -p $(MANDIR)
|
||||
for page in *.$(MANSECT); do \
|
||||
echo "installing $(MANDIR)/$$page"; \
|
||||
$(RM) $(MANDIR)/$$page $(MANDIR)/$$page$(MANCOMPRESSSUFFIX); \
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 644 $$TMPMAN $(MANDIR)/$$page$(MANCOMPRESSSUFFIX); \
|
||||
$(RM) $(MANDIR)/$$page; \
|
||||
$(INSTALL) $(INSTALLFLAGS) -m 644 $$page.$(TMP_SUFFIX) $(MANDIR)/$$page; \
|
||||
if [ -f "$$page.links" ]; then \
|
||||
for link in `$(CAT) $$page.links`; do \
|
||||
echo "installing $(MANDIR)/$$link as link to $$page"; \
|
||||
$(RM) $(MANDIR)/$$link $(MANDIR)/$$link$(MANCOMPRESSSUFFIX); \
|
||||
$(LN_S) $$page$(MANCOMPRESSSUFFIX) $(MANDIR)/$$link$(MANCOMPRESSSUFFIX); \
|
||||
$(RM) $(INSTDIR)/$$link $(MANDIR)/$$link; \
|
||||
$(LN_S) -sf $$page $(MANDIR)/$$link; \
|
||||
done; \
|
||||
fi; \
|
||||
done; \
|
||||
$(RM) $$TMPMAN
|
||||
|
||||
Makefile: $(top_srcdir)/build/lib.mk
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user