TCSHDIR= ${.CURDIR}/../../../contrib/tcsh-6 .PATH: ${TCSHDIR} ${.CURDIR}/../csh PROG= gethost SRCS= gethost.c sh.err.h tc.const.h DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' CFLAGS+= -I. -I${.CURDIR}/../csh -I${TCSHDIR} ${DFLAGS} sh.err.h: sh.err.c @rm -f ${.TARGET} @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} @echo '#ifndef _h_sh_err' >> ${.TARGET} @echo '#define _h_sh_err' >> ${.TARGET} grep 'ERR_' ${.ALLSRC} | grep '^#define' >> ${.TARGET} @echo '#endif /* _h_sh_err */' >> ${.TARGET} tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h @rm -f ${.TARGET} @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} @echo '#ifndef _h_tc_const' >> ${.TARGET} @echo '#define _h_tc_const' >> ${.TARGET} ${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | grep 'Char STR' | \ sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ sort >> ${.TARGET} @echo '#endif /* _h_tc_const */' >> ${.TARGET} CLEANFILES+= sh.err.h tc.const.h build-tools: gethost.nx # this gethost is used in place, it is not installed anywhere install: .include