[BACK]Return to bsd.man.mk CVS log [TXT][DIR] Up to [local] / src / share / mk

Diff for /src/share/mk/bsd.man.mk between version 1.17 and 1.18

version 1.17, 1999/11/27 04:31:12 version 1.18, 2000/05/16 19:34:47
Line 37 
Line 37 
 MCOMPRESSSUFFIX= .gz  MCOMPRESSSUFFIX= .gz
 .endif  .endif
   
   .if defined(MANSUBDIR)
   # Add / so that we don't have to specify it. Better arch -> MANSUBDIR mapping
   MANSUBDIR:=${MANSUBDIR:S,^,/,}
   .else
   # XXX MANSUBDIR must be non empty for the mlink loops to work
   MANSUBDIR=''
   .endif
   
 maninstall:  maninstall:
 .if defined(MANALL)  .if defined(MANALL)
         @for page in ${MANALL}; do \          @for page in ${MANALL}; do \
                   set -- ${MANSUBDIR}; \
                   subdir=$$1; \
                 dir=${DESTDIR}${MANDIR}$${page##*.cat}; \                  dir=${DESTDIR}${MANDIR}$${page##*.cat}; \
                 base=$${page##*/}; \                  base=$${page##*/}; \
                 instpage=$${dir}${MANSUBDIR}/$${base%.*}.0${MCOMPRESSSUFFIX}; \                  instpage=$${dir}$${subdir}/$${base%.*}.0${MCOMPRESSSUFFIX}; \
                 if [ X"${MCOMPRESS}" = X ]; then \                  if [ X"${MCOMPRESS}" = X ]; then \
                         echo ${MINSTALL} $$page $$instpage; \                          echo ${MINSTALL} $$page $$instpage; \
                         ${MINSTALL} $$page $$instpage; \                          ${MINSTALL} $$page $$instpage; \
Line 52 
Line 62 
                         ${MCOMPRESS} $$page > $$instpage; \                          ${MCOMPRESS} $$page > $$instpage; \
                         chown ${MANOWN}:${MANGRP} $$instpage; \                          chown ${MANOWN}:${MANGRP} $$instpage; \
                         chmod ${MANMODE} $$instpage; \                          chmod ${MANMODE} $$instpage; \
                 fi \                  fi; \
                   while test $$# -ge 2; do \
                           shift; \
                           extra=$${dir}$$1/$${base%.*}.0${MCOMPRESSSUFFIX}; \
                           echo $$extra -\> $$instpage; \
                           ln -f $$instpage $$extra; \
                   done; \
         done          done
 .endif  .endif
 .if defined(MLINKS) && !empty(MLINKS)  .if defined(MLINKS) && !empty(MLINKS)
   .  for _subdir in ${MANSUBDIR}
         @set ${MLINKS}; \          @set ${MLINKS}; \
         while test $$# -ge 2; do \          while test $$# -ge 2; do \
                 name=$$1; \                  name=$$1; \
                 shift; \                  shift; \
                 dir=${DESTDIR}${MANDIR}$${name##*.}; \                  dir=${DESTDIR}${MANDIR}$${name##*.}; \
                 l=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \                  l=$${dir}${_subdir}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
                 name=$$1; \                  name=$$1; \
                 shift; \                  shift; \
                 dir=${DESTDIR}${MANDIR}$${name##*.}; \                  dir=${DESTDIR}${MANDIR}$${name##*.}; \
                 t=$${dir}${MANSUBDIR}/$${name%.*}.0${MCOMPRESSSUFFIX}; \                  t=$${dir}${_subdir}/$${name%.*}.0${MCOMPRESSSUFFIX}; \
                 echo $$t -\> $$l; \                  echo $$t -\> $$l; \
                 rm -f $$t; \                  rm -f $$t; \
                 ln $$l $$t; \                  ln $$l $$t; \
         done          done
   .  endfor
 .endif  .endif
   
 .if defined(MANALL) && !defined(MANLOCALBUILD)  .if defined(MANALL) && !defined(MANLOCALBUILD)

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18