`# $Id: Makefile.host,v 1.17 2012/08/23 17:15:46 ksb Exp $ # platform Makefile for kicker PROG= kicker VAR= /var/kicker BIN= ${DESTDIR}/usr/local/sbin DOC= ${DESTDIR}/usr/local/man INIT= ${DESTDIR}/etc/init.d SP_GROUP='ifelse(HOSTTYPE,`FREEBSD',`sys', `adm')` I=/usr/include S=/usr/include/sys L=/usr/include/local P= INCLUDE= DEBUG= -g CDEFS= -D'HOSTTYPE` CFLAGS= ${DEBUG} ${CDEFS} ${INCLUDE} YFLAGS= GENC= main.c GENH= main.h GEN= ${GENC} ${GENH} HDR= machine.h SRC= DEP= ${GENC} ${LINKC} ${SRC} OBJ= main.o MAN= kicker.man OTHER= README TODO INSTALL kicker.html kicker.sh kicker.cron \ kicker.m kicker.mc SOURCE= Makefile ITO.spec ${OTHER} ${MAN} ${HDR} ${SRC} SPOOLS= ${VAR}/00 ${VAR}/01 ${VAR}/02 ${VAR}/03 ${VAR}/04 ${VAR}/05 \ ${VAR}/06 ${VAR}/07 ${VAR}/08 ${VAR}/09 ${VAR}/10 ${VAR}/11 \ ${VAR}/12 ${VAR}/13 ${VAR}/14 ${VAR}/15 ${VAR}/16 ${VAR}/17 \ ${VAR}/18 ${VAR}/19 ${VAR}/20 ${VAR}/21 ${VAR}/22 ${VAR}/23 \ ${VAR}/eod ${VAR}/top TMP= crontab.new crontab.current all: ${PROG} ${PROG}:$P ${OBJ} ${CC} -o $@ ${CFLAGS} ${OBJ} main.h: main.c main.c: ${PROG}.m mkcmd ${PROG}.m -(cmp -s prog.c main.c || (cp prog.c main.c && echo main.c updated)) -(cmp -s prog.h main.h || (cp prog.h main.h && echo main.h updated)) rm -f prog.[ch] # not missing "${DESTDIR}" bug here -- ksb ${VAR}: install -d -m 2755 -o root -g ${SP_GROUP} $@ ${SPOOLS}: ${VAR} install -d -m 2775 -o root -g ${SP_GROUP} $@ install_init: kicker.sh install -c -S../rc3.d/S50kicker kicker.sh ${INIT}/kicker install_spool: ${SPOOLS} crontab.current: crontab -l >$@ crontab.new: kicker.cron crontab.current false ; : "use crontab -e, this is broken" ( grep "^#" crontab.current ; \ ( grep -v "^#" crontab.current ; \ 'ifelse(`FREEBSD',HOSTTYPE,`cat kicker.cron', ``grep -v "^#" kicker.cron |sed -n -e "s/root[ ]*//p"'')` \ ) | sort -n +2 +1 |uniq ; \ ) >$@ install_crontab: crontab.new crontab crontab.new root clean: FRC rm -f Makefile.bak ${PROG} ${GEN} ${TMP} ${LINK} *.o a.out core errs lint.out tags calls: ${SRC} ${HDR} ${GEN} FRC calls ${CDEFS} ${INCLUDE} ${DEP} deinstall: ${MAN} ${DOC} FRC install -R ${BIN}/${PROG} mkcat -r${DOC} -D ${MAN} depend: ${SRC} ${HDR} ${GEN} ${LINK} FRC maketd ${CDEFS} ${INCLUDE} ${DEP} dirs: ${BIN} distrib: FRC distrib -c ${BIN}/${PROG} HOST install: all dirs FRC install -cs ${PROG} ${BIN}/${PROG} lint: ${SRC} ${HDR} ${GEN} FRC lint -h ${CDEFS} ${INCLUDE} ${DEP} mkcat: ${MAN} ${DOC} FRC mkcat -r${DOC} ${MAN} print: source FRC lpr -J"${PROG} source" ${SOURCE} source: ${SOURCE} spotless: clean rcsclean ${SOURCE} tags: ${HDR} ${SRC} ${GEN} ctags -t ${HDR} ${SRC} ${GEN} ${BIN}: install -dr $@ ${SOURCE}: co -q $@ FRC: # DO NOT DELETE THIS LINE - make depend DEPENDS ON IT main.c: kicker.m kicker.mc main.o: main.c machine.h # *** Do not add anything here - It will go away. *** 'dnl