9base

revived minimalist port of Plan 9 userland to Unix
git clone git://git.suckless.org/9base
Log | Files | Refs | README | LICENSE

commit 0bde8c3f2dbf397d1e0aeff6ca221f2ec6634636
parent 700cf66080b87f33e01e080dd25c6a63529f38aa
Author: garbeam@mmv.wmii.de <unknown>
Date:   Mon, 19 Dec 2005 19:50:43 +0200

added yacc.mk

Diffstat:
yacc.mk | 38++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+), 0 deletions(-)

diff --git a/yacc.mk b/yacc.mk @@ -0,0 +1,38 @@ +# yacc.mk - included by all Makefiles in subdirs which depend on yacc + +include ../config.mk + +all: + @if [ ! -f y.tab.c ]; then \ + make -f Makefile depend;\ + fi + @make -f Makefile ${TARG} + @echo built ${TARG} + + +depend: + @echo YACC ${YFILES} + @${YACC} -d ${YFILES} + +install: ${TARG} + @mkdir -p ${DESTDIR}${PREFIX}/bin + @cp -f ${TARG} ${DESTDIR}${PREFIX}/bin/ + @chmod 755 ${DESTDIR}${PREFIX}/bin/${TARG} + @mkdir -p ${DESTDIR}${MANPREFIX}/man1 + @cp -f ${MANFILES} ${DESTDIR}${MANPREFIX}/man1 + @chmod 444 ${DESTDIR}${MANPREFIX}/man1/${MANFILES} + +uninstall: + rm -f ${DESTDIR}${PREFIX}/bin/${TARG} + rm -f ${DESTDIR}${PREFIX}/man1/${MANFILES} + +.c.o: + @echo CC $*.c + @${CC} ${CFLAGS} -I../lib9 -I${PREFIX}/include -I../lib9 $*.c + +clean: + rm -f ${OFILES} ${TARG} y.tab.c y.tab.h + +${TARG}: ${OFILES} + @echo LD ${TARG} + @${CC} ${LDFLAGS} -o ${TARG} ${OFILES} -lm -L${PREFIX}/lib -L../lib9 -l9