# $Id: Makefile,v 5.12 2012/08/09 16:32:21 ksb Exp $ # meta Makefile for distrib, msrc 2008 version INTO= /usr/src/local/sbin/distrib SUBDIR= Example Scripts GEN= SOURCE= Makefile Makefile.host Msrc.hxmd INSTALL README TODO ITO.spec \ distrib.html distrib.man distrib.c distrib.h distrib.m support.m \ envlist.c envlist.h machine.h clean: FRC rm -f ${GEN} main.c: distrib.m mkcmd -G distrib.m -(cmp -s prog.c main.c || (mv prog.c main.c && echo main.c updated)) -(cmp -s prog.h main.h || (mv prog.h main.h && echo main.h updated)) rm -rf prog.[ch] # loop-back from Msrc.hxmd, for local or remote updates --ksb # set to -x to trace the xapply recursion X_OPT= # SILENT allows msrcmux to work w/o the sed/perl 1d hack. Set empty # to see the recursion. SILENT=.SILENT remote_descend: ${SILENT} xapply ${X_OPT} 'cd %1 && msrc ${DOWN_CFG} -E HOST=${THOST} -y INTO=${TINTO}/%1 -- make source' ${SUBDIR} local_descend: ${SILENT} xapply ${X_OPT} 'cd %1 && mmsrc ${DOWN_CFG} -E HOST=${THOST} -y INTO=${LINTO}/%1 -- make source' ${SUBDIR} source: ${SOURCE} ${GEN} ${SOURCE}: co -q $@ FRC: # msrc patch to get up-to-date and checked-out sources __msrc: source