Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 1995 18:49:08 +0100
From:      Wolfram Schneider <wosch@cs.tu-berlin.de>
To:        current@FreeBSD.org
Subject:   bsd.man.mk and catman
Message-ID:  <199503231749.SAA25377@caramba.cs.tu-berlin.de>

next in thread | raw e-mail | index | archive | help

Installing man pages (make world) force catman to reformat this pages.
This is not neccessary because most pages are not changed. The patch
install only new pages. Bug: owner/mode also unchanged.

Wolfram

--
http://hyperg.cs.tu-berlin.de:2080/C~wosch



*** /usr/share/mk/bsd.man.mk	Sun Jan  1 04:33:36 1995
--- bsd.man.mk	Thu Mar 23 18:11:36 1995
***************
*** 12,18 ****
  
  MANDIR?=	/usr/share/man/man
  MANSRC?=	${.CURDIR}
! MINSTALL=	${INSTALL}  ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
  
  MCOMPRESS=	gzip -f
  BASENAME=	basename
--- 12,43 ----
  
  MANDIR?=	/usr/share/man/man
  MANSRC?=	${.CURDIR}
! MINSTALL=	Install () { \
! 		source=$$1; dir=$$2; 					\
! 		if [ -f "$$dir/$$source" ]; then 			\
! 			if cmp $$source $$dir/$$source >/dev/null 2>&1; \
! 			then 						\
! 				${ECHO} "Manpage $$source is up to date"; \
! 			else 						\
! 				${ECHO} "install $$source in $$dir"; 	\
! 				${MINSTALL2} $$source $$dir; 		\
! 			fi; 						\
! 		elif [ -f "$$dir/$$source.gz" ]; then 			\
! 			if ${MCOMPRESS} -c -d $$dir/$$source.gz | 	\
! 			cmp - $$source >/dev/null 2>&1; then 		\
! 				${ECHO} "Manpage $$source is up to date"; \
! 			else 						\
! 				${ECHO} "install $$source in $$dir"; 	\
! 				${MINSTALL2} $$source $$dir; 		\
! 			fi; 						\
! 		else 							\
! 			${ECHO} "install $$source in $$dir"; 		\
! 			${MINSTALL2} $$source $$dir; 			\
! 		fi; 							\
! 		}; Install
! 	
! MINSTALL2=	${INSTALL}  ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
! #MINSTALL2=	${INSTALL}  ${COPY} -m ${MANMODE}
  
  MCOMPRESS=	gzip -f
  BASENAME=	basename
***************
*** 28,58 ****
  
  maninstall: ${MANDEPEND}
  .if defined(MAN1) && !empty(MAN1)
! 	(cd ${MANSRC}; ${MINSTALL} ${MAN1} ${DESTDIR}${MANDIR}1${MANSUBDIR})
  .endif
  .if defined(MAN2) && !empty(MAN2)
! 	(cd ${MANSRC}; ${MINSTALL} ${MAN2} ${DESTDIR}${MANDIR}2${MANSUBDIR})
  .endif
  .if defined(MAN3) && !empty(MAN3)
! 	(cd ${MANSRC}; ${MINSTALL} ${MAN3} ${DESTDIR}${MANDIR}3${MANSUBDIR})
  .endif
  .if defined(MAN3F) && !empty(MAN3F)
! 	(cd ${MANSRC}; ${MINSTALL} ${MAN3F} ${DESTDIR}${MANDIR}3f${MANSUBDIR})
  .endif
  .if defined(MAN4) && !empty(MAN4)
! 	(cd ${MANSRC}; ${MINSTALL} ${MAN4} ${DESTDIR}${MANDIR}4${MANSUBDIR})
  .endif
  .if defined(MAN5) && !empty(MAN5)
! 	(cd ${MANSRC}; ${MINSTALL} ${MAN5} ${DESTDIR}${MANDIR}5${MANSUBDIR})
  .endif
  .if defined(MAN6) && !empty(MAN6)
! 	(cd ${MANSRC}; ${MINSTALL} ${MAN6} ${DESTDIR}${MANDIR}6${MANSUBDIR})
  .endif
  .if defined(MAN7) && !empty(MAN7)
! 	(cd ${MANSRC}; ${MINSTALL} ${MAN7} ${DESTDIR}${MANDIR}7${MANSUBDIR})
  .endif
  .if defined(MAN8) && !empty(MAN8)
! 	(cd ${MANSRC}; ${MINSTALL} ${MAN8} ${DESTDIR}${MANDIR}8${MANSUBDIR})
  .endif
  
  # by default all pages are compressed
--- 53,83 ----
  
  maninstall: ${MANDEPEND}
  .if defined(MAN1) && !empty(MAN1)
! 	@(cd ${MANSRC}; ${MINSTALL} ${MAN1} ${DESTDIR}${MANDIR}1${MANSUBDIR})
  .endif
  .if defined(MAN2) && !empty(MAN2)
! 	@(cd ${MANSRC}; ${MINSTALL} ${MAN2} ${DESTDIR}${MANDIR}2${MANSUBDIR})
  .endif
  .if defined(MAN3) && !empty(MAN3)
! 	@(cd ${MANSRC}; ${MINSTALL} ${MAN3} ${DESTDIR}${MANDIR}3${MANSUBDIR})
  .endif
  .if defined(MAN3F) && !empty(MAN3F)
! 	@(cd ${MANSRC}; ${MINSTALL} ${MAN3F} ${DESTDIR}${MANDIR}3f${MANSUBDIR})
  .endif
  .if defined(MAN4) && !empty(MAN4)
! 	@(cd ${MANSRC}; ${MINSTALL} ${MAN4} ${DESTDIR}${MANDIR}4${MANSUBDIR})
  .endif
  .if defined(MAN5) && !empty(MAN5)
! 	@(cd ${MANSRC}; ${MINSTALL} ${MAN5} ${DESTDIR}${MANDIR}5${MANSUBDIR})
  .endif
  .if defined(MAN6) && !empty(MAN6)
! 	@(cd ${MANSRC}; ${MINSTALL} ${MAN6} ${DESTDIR}${MANDIR}6${MANSUBDIR})
  .endif
  .if defined(MAN7) && !empty(MAN7)
! 	@(cd ${MANSRC}; ${MINSTALL} ${MAN7} ${DESTDIR}${MANDIR}7${MANSUBDIR})
  .endif
  .if defined(MAN8) && !empty(MAN8)
! 	@(cd ${MANSRC}; ${MINSTALL} ${MAN8} ${DESTDIR}${MANDIR}8${MANSUBDIR})
  .endif
  
  # by default all pages are compressed
***************
*** 63,72 ****
  	while test $$# -ge 1; do					\
  		name=`${BASENAME} $$1`;					\
  		sect=`expr $$name : '.*\.\([^.]*\)'`;			\
! 		${ECHO} "compressing in"				\
  			"${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}:"	\
  			"$$name -> $${name}${ZEXT}";			\
  		${MCOMPRESS} ${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name ; \
  		shift ;							\
  	done ; true
  .else
--- 88,101 ----
  	while test $$# -ge 1; do					\
  		name=`${BASENAME} $$1`;					\
  		sect=`expr $$name : '.*\.\([^.]*\)'`;			\
! 		if [ ! -f "${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name" -a -f "${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name.gz" ]; then \
! 			:;						\
! 		else 							\
! 			${ECHO} "compressing in"			\
  			"${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}:"	\
  			"$$name -> $${name}${ZEXT}";			\
  		${MCOMPRESS} ${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name ; \
+ 		fi; \
  		shift ;							\
  	done ; true
  .else



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503231749.SAA25377>