`# $Id: Makefile.host,v 1.105 2012/12/20 23:53:02 ksb Exp $ # platform recipe for op(1) rule distribtion 'pushdef(`SERVTOCF',`ifelse($1,`',`',`service/$1.cf' `SERVTOCF(shift($@))')')dnl changequote([,])dnl [Q=' O=` ]changequote(`,')dnl ` TOP=/usr/local RUN_BIN=${TOP}/bin/op LIB= ${DESTDIR}${TOP}/lib/op LIBEXEC=${DESTDIR}${TOP}/libexec/op MAKE=make DOC= ${DESTDIR}${TOP}/man DATA= 'ifdef(`SERVICE',`SERVTOCF(translit(SERVICE,` ',`,'))')`'popdef(`SERVTOCF')` MAN= OTHER= README.FEDEX README TODO op.cf.man op.cf sane.pl service.html SOURCE= Makefile ${OTHER} ${MAN} ${DATA} # To cleanup unused libexec scripts uncomment this line, or set on cmd-line # local site policy option to force cleanup for unused libexec scripts #DEINSTALL=deinstall all: ${DATA} access.cf class/class.cf cd remote && ${MAKE} DESTDIR=${DESTDIR} TOP=${TOP} LIB=${LIB} $@ # We need to know our uname -i on a Solaris host, this is a poor way to find it. access.cf: hosttype/access.cf 'ifelse(HOSTTYPE,`SUN5',`sed -e "s/\${O}uname -i\${O}/${O}uname -i${O}/g" $@ ',`cp hosttype/access.cf $@ ')dnl ` clean: FRC rm -f Makefile.bak access.cf a.out core errs lint.out tags depend: FRC dirs: ${LIB} ${LIBEXEC} ${LIB}: install -d -o root -m0700 ${LIB} ${LIBEXEC}: install -d -o root -m0755 ${LIBEXEC} distrib: FRC distrib -c ${LIB} HOST sane: all set +e ; \ ${RUN_BIN} -Sn access.cf class/class.cf ${DATA} ; ERR="$$?" ; \ [ 0 -eq "$$ERR" -o 66 -eq "$$ERR" -o 67 -eq "$$ERR" ] || exit $$ERR install: all dirs FRC for dink in ${O}find ${LIB} -type f | grep -v /OLD/ | sed -e ${Q}s,^${LIB}/,,${Q}${O} ; \ do \ [ -s service/$$dink ] || [ -s class/$$dink ] || [ -s hosttype/$$dink ] || [ -s remote/$$dink ] || install -R ${LIB}/$$dink ; \ done xapply -P1 ${Q}[ -s %1 ] && install -cm 0400 -o root %1 ${LIB}${Q} access.cf class/class.cf ${DATA} (cd remote && ${MAKE} DESTDIR=${DESTDIR} TOP=${TOP} LIB=${LIB} $@) (cd libexec && ${MAKE} DESTDIR=${DESTDIR} TOP=${TOP} LIB=${LIB} ${DEINSTALL} $@) lint: FRC mkcat: ${MAN} ${DOC} FRC mkcat -r${DOC} ${MAN} print: source FRC lpr -J"${LIB} source" ${SOURCE} source: ${SOURCE} spotless: clean rcsclean ${SOURCE} tags: FRC ${SOURCE}: co -q $@ FRC: 'dnl