1# $Id: bsd.info.mk,v 1.12 1995/02/25 20:51:11 phk Exp $ 2 3BINMODE= 444 4BINDIR?= /usr/share/info 5MAKEINFO?= makeinfo 6MAKEINFOFLAGS?= # --no-split would simplify some things, e.g., compression 7 8.MAIN: all 9 10.SUFFIXES: .info .texi .texinfo 11.texi.info: 12 ${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} ${.IMPSRC} -o ${.TARGET} 13.texinfo.info: 14 ${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} ${.IMPSRC} -o ${.TARGET} 15 16.PATH: ${.CURDIR} 17 18all: ${INFO:S/$/.info/g} 19 20# The default is "info" and it can never be "bin" 21DISTRIBUTION?= info 22.if ${DISTRIBUTION} == "bin" 23DISTRIBUTION= info 24.endif 25 26.if !target(distribute) 27distribute: 28 cd ${.CURDIR} ; $(MAKE) install DESTDIR=${DISTDIR}/${DISTRIBUTION} SHARED=copies 29.endif 30 31.if defined(SRCS) 32${INFO}.info: ${SRCS} 33 ${MAKEINFO} ${MAKEINFOFLAGS} -I ${.CURDIR} ${SRCS:S/^/${.CURDIR}\//g} -o ${INFO}.info 34.endif 35 36depend: 37 @echo -n 38 39.if !target(obj) 40.if defined(NOOBJ) 41obj: 42.else 43obj: 44 @cd ${.CURDIR}; rm -f obj; \ 45 here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \ 46 ${ECHO} "$$here -> $$dest"; ln -s $$dest obj; \ 47 if test -d /usr/obj -a ! -d $$dest; then \ 48 mkdir -p $$dest; \ 49 else \ 50 true; \ 51 fi; 52.endif 53.endif 54 55clean: 56 rm -f ${INFO:S/$/.info*/g} [eE]rrs mklog ${CLEANFILES} 57 58cleandir: clean 59 cd ${.CURDIR}; rm -rf obj 60 61install: 62 @if [ ! -d "${DESTDIR}${BINDIR}" ]; then \ 63 /bin/rm -f ${DESTDIR}${BINDIR} ; \ 64 mkdir -p ${DESTDIR}${BINDIR} ; \ 65 chown root.wheel ${DESTDIR}${BINDIR} ; \ 66 chmod 755 ${DESTDIR}${BINDIR} ; \ 67 else \ 68 true ; \ 69 fi 70 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 71 ${INFO:S/$/.info*/g} ${DESTDIR}${BINDIR} 72 73.if !target(maninstall) 74maninstall: 75 76.endif 77