Home | History | Annotate | Line # | Download | only in mk
bsd.man.mk revision 1.14
      1  1.14      cgd #	$NetBSD: bsd.man.mk,v 1.14 1994/06/30 05:31:15 cgd Exp $
      2  1.14      cgd #	@(#)bsd.man.mk	5.2 (Berkeley) 5/11/90
      3   1.1      cgd 
      4   1.9  mycroft .if !target(.MAIN)
      5   1.1      cgd .if exists(${.CURDIR}/../Makefile.inc)
      6   1.1      cgd .include "${.CURDIR}/../Makefile.inc"
      7   1.9  mycroft .endif
      8   1.9  mycroft 
      9   1.9  mycroft .MAIN: all
     10   1.1      cgd .endif
     11  1.12      jtc 
     12  1.12      jtc .SUFFIXES: .0 .1 .2 .3 .4 .5 .6 .7 .8
     13  1.12      jtc 
     14  1.12      jtc .8.0 .7.0 .6.0 .5.0 .4.0 .3.0 .2.0 .1.0:
     15  1.12      jtc 	@echo "nroff -mandoc ${.IMPSRC} > ${.TARGET}"
     16  1.12      jtc 	@nroff -mandoc ${.IMPSRC} > ${.TARGET} || ( rm -f ${.TARGET} ; false )
     17  1.12      jtc 
     18   1.1      cgd 
     19   1.5      cgd MINSTALL=	install ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
     20   1.1      cgd 
     21   1.1      cgd maninstall:
     22   1.1      cgd .if defined(MAN1) && !empty(MAN1)
     23   1.8  mycroft MANALL+=${MAN1}
     24  1.10  mycroft maninstall: man1install
     25  1.10  mycroft man1install:
     26   1.1      cgd 	${MINSTALL} ${MAN1} ${DESTDIR}${MANDIR}1${MANSUBDIR}
     27   1.1      cgd .endif
     28   1.1      cgd .if defined(MAN2) && !empty(MAN2)
     29   1.8  mycroft MANALL+=${MAN2}
     30  1.10  mycroft maninstall: man2install
     31  1.10  mycroft man2install:
     32   1.1      cgd 	${MINSTALL} ${MAN2} ${DESTDIR}${MANDIR}2${MANSUBDIR}
     33   1.1      cgd .endif
     34   1.1      cgd .if defined(MAN3) && !empty(MAN3)
     35   1.8  mycroft MANALL+=${MAN3}
     36  1.10  mycroft maninstall: man3install
     37  1.10  mycroft man3install:
     38   1.1      cgd 	${MINSTALL} ${MAN3} ${DESTDIR}${MANDIR}3${MANSUBDIR}
     39   1.1      cgd .endif
     40   1.1      cgd .if defined(MAN3F) && !empty(MAN3F)
     41   1.8  mycroft MANALL+=${MAN3F}
     42  1.10  mycroft maninstall: man3finstall
     43  1.10  mycroft man3finstall:
     44   1.1      cgd 	${MINSTALL} ${MAN3F} ${DESTDIR}${MANDIR}3f${MANSUBDIR}
     45   1.1      cgd .endif
     46   1.1      cgd .if defined(MAN4) && !empty(MAN4)
     47   1.8  mycroft MANALL+=${MAN4}
     48  1.10  mycroft maninstall: man4install
     49  1.10  mycroft man4install:
     50   1.1      cgd 	${MINSTALL} ${MAN4} ${DESTDIR}${MANDIR}4${MANSUBDIR}
     51   1.1      cgd .endif
     52   1.1      cgd .if defined(MAN5) && !empty(MAN5)
     53   1.8  mycroft MANALL+=${MAN5}
     54  1.10  mycroft maninstall: man5install
     55  1.10  mycroft man5install:
     56   1.1      cgd 	${MINSTALL} ${MAN5} ${DESTDIR}${MANDIR}5${MANSUBDIR}
     57   1.1      cgd .endif
     58   1.1      cgd .if defined(MAN6) && !empty(MAN6)
     59   1.8  mycroft MANALL+=${MAN6}
     60  1.10  mycroft maninstall: man6install
     61  1.10  mycroft man6install:
     62   1.1      cgd 	${MINSTALL} ${MAN6} ${DESTDIR}${MANDIR}6${MANSUBDIR}
     63   1.1      cgd .endif
     64   1.1      cgd .if defined(MAN7) && !empty(MAN7)
     65   1.8  mycroft MANALL+=${MAN7}
     66  1.10  mycroft maninstall: man7install
     67  1.10  mycroft man7install:
     68   1.1      cgd 	${MINSTALL} ${MAN7} ${DESTDIR}${MANDIR}7${MANSUBDIR}
     69   1.1      cgd .endif
     70   1.1      cgd .if defined(MAN8) && !empty(MAN8)
     71   1.8  mycroft MANALL+=${MAN8}
     72  1.10  mycroft maninstall: man8install
     73  1.10  mycroft man8install:
     74   1.1      cgd 	${MINSTALL} ${MAN8} ${DESTDIR}${MANDIR}8${MANSUBDIR}
     75   1.1      cgd .endif
     76   1.1      cgd .if defined(MLINKS) && !empty(MLINKS)
     77  1.10  mycroft maninstall: manlinkinstall
     78  1.10  mycroft manlinkinstall:
     79   1.1      cgd 	@set ${MLINKS}; \
     80   1.1      cgd 	while test $$# -ge 2; do \
     81   1.1      cgd 		name=$$1; \
     82   1.1      cgd 		shift; \
     83  1.11      jtc 		dir=${DESTDIR}${MANDIR}`expr $$name : '.*\.\(.*\)'`; \
     84  1.11      jtc 		l=$${dir}${MANSUBDIR}/`expr $$name : '\(.*\)\..*'`.0; \
     85   1.1      cgd 		name=$$1; \
     86   1.1      cgd 		shift; \
     87  1.11      jtc 		dir=${DESTDIR}${MANDIR}`expr $$name : '.*\.\(.*\)'`; \
     88  1.11      jtc 		t=$${dir}${MANSUBDIR}/`expr $$name : '\(.*\)\..*'`.0; \
     89   1.1      cgd 		echo $$t -\> $$l; \
     90   1.1      cgd 		rm -f $$t; \
     91   1.1      cgd 		ln $$l $$t; \
     92   1.1      cgd 	done; true
     93   1.8  mycroft .endif
     94   1.8  mycroft 
     95   1.8  mycroft .if defined(MANALL)
     96   1.8  mycroft all: ${MANALL}
     97   1.8  mycroft 
     98   1.8  mycroft cleandir: cleanman
     99   1.8  mycroft cleanman:
    100   1.8  mycroft 	rm -f ${MANALL}
    101   1.1      cgd .endif
    102