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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
|
# $Header: /cvs/src/jbofihe/Makefile.in,v 1.60 2001/08/03 20:39:54 richard Exp $
#
# Makefile for parser/glosser
#
#
# Copyright (C) Richard P. Curnow 1998-2001
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#
#
#
PREFIX=@@PREFIX@@
EXEDIR=$(PREFIX)/bin
LIBDIR=$(PREFIX)/lib/jbofihe
DICTNAME=smujmaji.dat
DICTIONARY=$(LIBDIR)/$(DICTNAME)
MANDIR=$(PREFIX)/man/man1
CMAFIHE_LDOPTS=@@CMAFIHE_LDOPTS@@
CC=gcc
CFLAGS= @@OPTDEBUG@@ @@DEFINES@@ -DDEFAULT_DICTIONARY=\"$(DICTIONARY)\"
OBJS2 = main.o lex1.o lex2.o cmavotab.o rpc_tab.o functions.o \
categ.o nonterm.o tree.o translate.o latex.o \
properties.o conversion.o terms.o memory.o tenses.o \
output.o textout.o htmlout.o connect.o stag.o latexblk.o \
relative.o textblk.o errorscan.o canonluj.o lujvofns.o \
erasure.o rpc_full.o morf.o morf_dfa.o bccheck.o \
tracebk.o elide.o dictaccs.o
SRCS2 = $(OBJS2:%.o=%.c)
CM_OBJS = cm_gather.o cm_output.o cm_main.o cm_translate.o cm_scan.o
CM_SRCS = $(CM_OBJS:%.o=%.c)
progs : jbofihe cmafihe jvocuhadju smujajgau vlatai
all : dictionary progs
jbofihe : $(OBJS2)
$(CC) $(CFLAGS) -o jbofihe $(OBJS2)
# Analyse shift/reduce conflicts in the grammar
conflict :
perl terminator.pl < rpc2x.y > rpc2x_noet.y
bison -v rpc2x_noet.y
%.o : %.c
$(CC) $(CFLAGS) -c $<
%.s : %.c
$(CC) $(CFLAGS) -S $<
rpc2x_nc.y : rpc2x.y uncom
./uncom < rpc2x.y > rpc2x_nc.y
rpc2x_act.y nonterm.h nonterm.c : rpc2x_nc.y
perl ./action.perl < rpc2x_nc.y > rpc2x_act.y
rpc2x_act.tab.c rpc2x_act.output rpc_tab.h : rpc2x_act.y
bison -v -d rpc2x_act.y
mv rpc2x_act.tab.h rpc_tab.h
rpc_tab.c : rpc2x_act.tab.c
perl add_trace_to_tabc.pl < rpc2x_act.tab.c > rpc_tab.c
# Create grammar that will only recognize text with all elidable cmavo present
rpc2x_full_nc.y : rpc2x.y terminator.pl uncom
perl terminator.pl < rpc2x.y | ./uncom > rpc2x_full_nc.y
rpc2x_full_act.y : rpc2x_full_nc.y
perl ./action.perl -nononterm < rpc2x_full_nc.y > rpc2x_full_act.y
rpc_full.c rpc2x_full_act.output : rpc2x_full_act.y
bison -v -p full_yy rpc2x_full_act.y
sed -e "s/full_yylex/yylex/;s/full_yydebug/yydebug/;s/full_yyerror/yyerror/;s/full_yylval/yylval/;" < rpc2x_full_act.tab.c | perl add_trace_to_tabc.pl > rpc_full.c
tracebk.o : tracebk.c trctabs.c trcftabs.c
trctabs.c : output2table.pl rpc2x_act.output
perl output2table.pl norm < rpc2x_act.output > trctabs.c
trcftabs.c : output2table.pl rpc2x_full_act.output
perl output2table.pl full < rpc2x_full_act.output > trcftabs.c
elitabs.c : output2elide.pl rpc2x_act.output
perl output2elide.pl < rpc2x_act.output > elitabs.c
elide.o : elide.c elitabs.c
dictaccs.o : dictaccs.c @@DICTDATA_C@@
dictdata.c: gismu_cmavo.dict
cat gismu_cmavo.dict places.dat extradict patterns | perl dict2inc.pl > dictdata.c
stag.c : stag.tab.c
cp stag.tab.c stag.c
stag.h : stag.tab.h
cp stag.tab.h stag.h
stag.tab.c stag.tab.h : stag.y
bison -v -d -p stag_ stag.y
uncom : uncom.o
$(CC) -o uncom uncom.o
uncom.o : uncom.c
$(CC) -O2 -c uncom.c
uncom.c : uncom.l
flex -t uncom.l > uncom.c
translate.o : translate.c
$(CC) $(CFLAGS) -c translate.c
smujajgau : smujajgau.o canonluj.o
$(CC) $(CFLAGS) -o smujajgau smujajgau.o canonluj.o
smujajgau.o : smujajgau.c
$(CC) $(CFLAGS) -c smujajgau.c
vlatai.o : morf.c morf.h morf_enc.c morf_lex.c morfvlex.c
$(CC) $(CFLAGS) -c -o vlatai.o -DTEST_MORF morf.c
vlatai : vlatai.o morf_dfa.o bccheck.o canonluj.o
$(CC) -o vlatai -DTEST_MORF $(CFLAGS) vlatai.o morf_dfa.o bccheck.o canonluj.o
morf_lex.c : mk_fetab.pl
perl mk_fetab.pl > morf_lex.c 2>morf_lex.err
morfvlex.c : mk_vfetab.pl
perl mk_vfetab.pl > morfvlex.c
morf_enc.c : mk_enctab.pl
perl mk_enctab.pl > morf_enc.c 2>morf_enc.err
morf_dfa.c : morf_nfa.in dfasyn/dfasyn
dfasyn/dfasyn -v -r morf_dfa.report morf_nfa.in -o morf_dfa.c
bctest : bccheck.c bctables.c
$(CC) $(CFLAGS) -o bctest -DTEST=1 bccheck.c
bccheck.o : bccheck.c bctables.c
bctables.c : bctables.in dfasyn/dfasyn
dfasyn/dfasyn -v -r bctables.report < bctables.in > bctables.c
dfasyn/dfasyn:
(cd dfasyn && make all)
morf.o : morf.c morf.h morf_dfa.c morf_enc.c morf_lex.c morfvlex.c
txtman: jbofihe.txt cmafihe.txt smujajgau.txt jvocuhadju.txt vlatai.txt
%.txt:%.1
groff -Tascii -man $< | perl -pe 'chomp; s/.\x8//g; $$_ .= "\r\n";' > $@
gismu_cmavo.dict: mkdict.pl
perl mkdict.pl > gismu_cmavo.dict
dictionary : smujajgau gismu_cmavo.dict
rm -f $(DICTNAME)
./smujajgau $(DICTNAME) gismu_cmavo.dict
if [ -r lujvo.txt ]; then \
perl lujvod.pl < ./lujvo.txt > lujvo.dict ;\
./smujajgau $(DICTNAME) lujvo.dict ;\
fi
if [ -r NORALUJV.txt ]; then \
perl noralujv.pl > noralujv.dict ;\
./smujajgau $(DICTNAME) noralujv.dict ;\
fi
./smujajgau $(DICTNAME) extradict places.dat patterns
dictupdate : $(DICTNAME)
$(DICTNAME) : extradict places.dat patterns
./smujajgau $(DICTNAME) extradict places.dat patterns
cmafihe : $(CM_OBJS)
$(CC) $(CFLAGS) $(CMAFIHE_LDOPTS) -o cmafihe $(CM_OBJS)
cm_scan.c : cm_scan.l
flex -t cm_scan.l > cm_scan.c
jvocuhadju : jvocuhadju.o lujvofns.o
$(CC) $(CFLAGS) -o jvocuhadju jvocuhadju.o lujvofns.o
jvocuhadju.o : jvocuhadju.c version.h
test_ivl : lujvofns.c
$(CC) $(CFLAGS) -o test_ivl -DTEST_IS_VALID_LUJVO lujvofns.c
smujajgau.o : smujajgau.c version.h
canonluj.o : canonluj.inc
canonluj.inc:
perl canonluj.pl < reduced_gismu > canonluj.inc
clean:
-(cd dfasyn && make clean)
rm -f *.output *.tab.c *_tab.c rpc_full.c *.o \
jbofihe cmafihe smujajgau vlatai jvocuhadju \
*.dict uncom.c uncom.o uncom \
morf_lex.c morfvlex.c morf_enc.c morf*_dfa.c \
elitabs.c trcftabs.c trctabs.c \
stag.c stag.h stag.tab.c stag.tab.h \
rpc2x_nc.y rpc2x_act.y rpc2x_full_nc.y rpc2x_full_act.y \
canonluj.inc version.h \
nonterm.c nonterm.h morf_dfa.report morf_lex.err \
bctables.c bctables.report bctest rpc_tab.h cm_scan.c
# Specify in this perverse way so that the $-Name construction doesn't get replaced on checkout!
version.h : version.txt
sed -e 's/[$$]Name: \(.*\) [$$]/\1/;' < version.txt > version.h
depend:
gcc -MM $(SRCS2) $(CM_SRCS) > .depend
install : jbofihe smujajgau cmafihe jvocuhadju $(DICTNAME)
[ -d $(EXEDIR) ] || mkdir -p $(EXEDIR)
[ -d $(LIBDIR) ] || mkdir -p $(LIBDIR)
[ -d $(MANDIR) ] || mkdir -p $(MANDIR)
for e in jbofihe cmafihe smujajgau jvocuhadju vlatai ; do cp $$e $(EXEDIR) ; chmod 755 $(EXEDIR)/$$e ; strip -s $(EXEDIR)/$$e ; done
if [ -r $(DICTNAME) ]; then for d in $(DICTNAME) ; do cp $$d $(LIBDIR) ; chmod 644 $(LIBDIR)/$$d ; done ; fi
for m in jbofihe.1 cmafihe.1 smujajgau.1 jvocuhadju.1 vlatai.1 ; do cp $$m $(MANDIR) ; chmod 755 $(MANDIR)/$$m ; done
## Include the dependency info below.
main.o: main.c nodes.h nonterm.h functions.h output.h version.h
lex1.o: lex1.c cmavotab.h nodes.h nonterm.h functions.h output.h \
lujvofns.h morf.h
lex2.o: lex2.c functions.h nonterm.h nodes.h output.h cmavotab.h \
rpc_tab.h elide.h
cmavotab.o: cmavotab.c cmavotab.h rpc_tab.h
rpc_tab.o: rpc_tab.c nodes.h nonterm.h functions.h output.h
functions.o: functions.c functions.h nonterm.h nodes.h output.h \
rpc_tab.h
categ.o: categ.c nodes.h nonterm.h rpc_tab.h functions.h output.h \
stag.h
nonterm.o: nonterm.c
tree.o: tree.c nonterm.h functions.h nodes.h output.h cmavotab.h \
rpc_tab.h
translate.o: translate.c functions.h nonterm.h nodes.h output.h \
canonluj.h
latex.o: latex.c functions.h nonterm.h nodes.h output.h latex.h
properties.o: properties.c nodes.h nonterm.h functions.h output.h
conversion.o: conversion.c nodes.h nonterm.h functions.h output.h \
rpc_tab.h cmavotab.h
terms.o: terms.c functions.h nonterm.h nodes.h output.h rpc_tab.h \
cmavotab.h
memory.o: memory.c functions.h nonterm.h nodes.h output.h
tenses.o: tenses.c rpc_tab.h nonterm.h functions.h nodes.h output.h
output.o: output.c nodes.h nonterm.h functions.h output.h cmavotab.h \
rpc_tab.h
textout.o: textout.c functions.h nonterm.h nodes.h output.h
htmlout.o: htmlout.c functions.h nonterm.h nodes.h output.h
connect.o: connect.c nodes.h nonterm.h functions.h output.h rpc_tab.h \
cmavotab.h
stag.o: stag.c
latexblk.o: latexblk.c functions.h nonterm.h nodes.h output.h latex.h
relative.o: relative.c nodes.h nonterm.h rpc_tab.h functions.h \
output.h cmavotab.h
textblk.o: textblk.c functions.h nonterm.h nodes.h output.h
errorscan.o: errorscan.c functions.h nonterm.h nodes.h output.h
canonluj.o: canonluj.c canonluj.h canonluj.inc
lujvofns.o: lujvofns.c lujvofns.h
erasure.o: erasure.c nodes.h nonterm.h rpc_tab.h functions.h output.h
rpc_full.o: rpc_full.c nodes.h nonterm.h functions.h output.h
morf.o: morf.c morf.h morf_lex.c morfvlex.c morf_dfa.c \
morf_enc.c
tracebk.o: tracebk.c trctabs.c trcftabs.c
elide.o: elide.c nodes.h nonterm.h rpc_tab.h cmavotab.h functions.h \
output.h elide.h elitabs.c
cm_gather.o: cm_gather.c cm.h
cm_output.o: cm_output.c cm.h
cm_main.o: cm_main.c cm.h version.h
cm_translate.o: cm_translate.c cm.h
cm_scan.o: cm_scan.c cm.h
|