Commit 460cb1a6 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix new man.mk to create tmp pages in object directory, not $(srcdir).

parent 8153a403
...@@ -11,8 +11,8 @@ TMP_SUFFIX=tmp ...@@ -11,8 +11,8 @@ TMP_SUFFIX=tmp
all-common: FORCE all-common: FORCE
VERSION=`$(CAT) $(VERSIONFILE)`; \ VERSION=`$(CAT) $(VERSIONFILE)`; \
cd $(srcdir); \ PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
for page in *.$(MANSECT); do \ for page in $$PAGES; do \
$(SED) -e "s%LDVERSION%$$VERSION%" \ $(SED) -e "s%LDVERSION%$$VERSION%" \
-e 's%ETCDIR%$(sysconfdir)%' \ -e 's%ETCDIR%$(sysconfdir)%' \
-e 's%LOCALSTATEDIR%$(localstatedir)%' \ -e 's%LOCALSTATEDIR%$(localstatedir)%' \
...@@ -22,18 +22,19 @@ all-common: FORCE ...@@ -22,18 +22,19 @@ all-common: FORCE
-e 's%BINDIR%$(bindir)%' \ -e 's%BINDIR%$(bindir)%' \
-e 's%LIBDIR%$(libdir)%' \ -e 's%LIBDIR%$(libdir)%' \
-e 's%LIBEXECDIR%$(libexecdir)%' \ -e 's%LIBEXECDIR%$(libexecdir)%' \
$$page > $$page.$(TMP_SUFFIX); \ $(srcdir)/$$page > $$page.$(TMP_SUFFIX); \
done done
touch all-common touch all-common
install-common: install-common:
-$(MKDIR) -p $(MANDIR) -$(MKDIR) $(MANDIR)
for page in *.$(MANSECT); do \ PAGES=`cd $(srcdir); echo *.$(MANSECT)`; \
for page in $$PAGES; do \
echo "installing $(MANDIR)/$$page"; \ echo "installing $(MANDIR)/$$page"; \
$(RM) $(MANDIR)/$$page; \ $(RM) $(MANDIR)/$$page; \
$(INSTALL) $(INSTALLFLAGS) -m 644 $$page.$(TMP_SUFFIX) $(MANDIR)/$$page; \ $(INSTALL) $(INSTALLFLAGS) -m 644 $$page.$(TMP_SUFFIX) $(MANDIR)/$$page; \
if [ -f "$$page.links" ]; then \ if [ -f "$(srcdir)/$$page.links" ]; then \
for link in `$(CAT) $$page.links`; do \ for link in `$(CAT) $(srcdir)/$$page.links`; do \
echo "installing $(MANDIR)/$$link as link to $$page"; \ echo "installing $(MANDIR)/$$link as link to $$page"; \
$(LN_S) -f $$page $(MANDIR)/$$link; \ $(LN_S) -f $$page $(MANDIR)/$$link; \
done; \ done; \
......
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