`# $Id: Makefile.host,v 1.2 2012/12/14 18:04:17 ksb Exp $ # This platform recipe only knows how to make source and install. # platform recipe for op sentinel directories TOP=/usr/local LIB=${DESTDIR}${TOP}/lib/op SOURCE= Makefile README Sentinels all: clean: FRC rm -f Makefile.bak core errs # Trap missing Init or Cleanup rules accessed below (before line number 95): # $Guard(*): echo "missing Guard markup in %f" 1>&2 ; exit 69 # $Init(*): ${install:-install} -d -g %[s/$] %s # $Cleanup(*): rm -f %s/*.cf && rm -rf %s/OLD && rmdir %s # $Owner(*): if grep "^%[s/$]:" /etc/passwd ; then ${chown:-chown} %[s/$] %s; else ${chown:-chown} nobody %s; fi # $Content(*): ${install:-install} -c -m 400 -o root -g %[s/$] %[s/$] %s/access.cf # # Just like ../remote, see that recipe. # The mk-marker "Guard" to test for the inclusion (exit 0) or exclusion # (exit non-zero) of each sentinel group. # # Crib the NG assignment from ../remote/Makefile.host if you need it. # It is possible that Cleanup should use the installed access.cf? # We really want |& and read -p below, but sh does not have it, we # could overflow argv in the for loop. install: FRC for f in $$(sed -n -e "s/^\([^:]*\):.*/\1/p" /etc/group) ; do \ [ ! -f $$f ] && continue ;\ if mk -tMakefile -smGuard -d"${LIB}/$$f" $$f ; then \ [ -d ${LIB}/$$f ] || {\ mk -tMakefile -smInit -d"${LIB}/$$f" $$f ;\ };\ mk -tMakefile -smContent -d"${LIB}/$$f" $$f ;\ continue;\ fi ;\ [ ! -d "${LIB}/$$f" ] || {\ mk -tMakefile -smCleanup -d"${LIB}/$$f" $$f ;\ };\ done source: ${SOURCE} ${SOURCE}: co -q $@ FRC: 'dnl