aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/mkfile
blob: 51e6ed6f832cfbdac63a2f4769294dae23ac2013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<$PLAN9/src/mkhdr

TARG=`ls *.[cy] | grep -v "\.tab\.c$" | sed 's/\.[cy]//'`

<$PLAN9/src/mkmany

BUGGERED='CVS|faces|factotum|mailfs|page|scat|upas|venti|vncv|postscript|mnihongo|mpm|index'
DIRS=lex `ls -l |sed -n 's/^d.* //p' |egrep -v "^($BUGGERED)$"|egrep -v '^lex$'`

<$PLAN9/src/mkdirs

dir-all dir-install: $PLAN9/bin/9yacc $PLAN9/bin/9lex

bc.tab.c units.tab.c: $PLAN9/bin/9yacc

%.tab.h %.tab.c: %.y
	$YACC $YFLAGS -s $stem $stem.y

%.o: %.tab.c
	9c -o $target $stem.tab.c

delatex.c:D: delatex.lx $PLAN9/bin/9lex
	9lex -t delatex.lx >delatex.c

$PLAN9/bin/9lex: $PLAN9/bin/9yacc
	cd lex; mk install

CLEANFILES=$CLEANFILES bc.tab.[ch] units.tab.[ch] delatex.c