Use lex/yacc for parsing the config file. Re-work the config file

format using a more human-readable format.

Read part descriptions from the config file now instead of hard-coding
them.

Update usage().

Cleanup unused code.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@79 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
bsd
2001-10-14 23:17:26 +00:00
parent 5dc50eb59f
commit f8677f8d4c
14 changed files with 2900 additions and 541 deletions

View File

@@ -17,28 +17,36 @@ DIRS = ${BINDIR} ${MANDIR} ${DOCDIR} ${CONFIGDIR}
INSTALL = /usr/bin/install -c -o root -g wheel
CFLAGS = -g -Wall --pedantic -DCONFIG_DIR=\"${CONFIGDIR}\"
CFLAGS = -g -Wall --pedantic -DCONFIG_DIR=\"${CONFIGDIR}\" ${YYDEF}
LDFLAGS =
YFLAGS = -t -d -v
INSTALL_PROGRAM = ${INSTALL} -m 555 -s
INSTALL_DATA = ${INSTALL} -m 444
INSTALL_MANUAL = ${INSTALL_DATA}
LIBS = -lreadline
LIBS = -lreadline
YYDEF = -DYYSTYPE="struct token_t *"
.include "Makefile.inc"
EXTRA_OBJS = config_gram.o lexer.o
OBJECTS = ${EXTRA_OBJS} ${OBJS}
all :
@if [ ! -f y.tab.h ]; then touch y.tab.h; fi
make depend
make ${TARGET}
${TARGET} : ${OBJS}
${CC} ${LDFLAGS} -o ${TARGET} ${OBJS} ${LIBS}
${TARGET} : ${OBJECTS}
${CC} ${LDFLAGS} -o ${TARGET} ${OBJECTS} ${LIBS}
clean :
rm -f *~ *.core ${TARGET} *.o
rm -f *.o lexer.c ${TARGET} *~ *.core y.tab.c y.tab.h
touch y.tab.h
install : dirs \
${BINDIR}/${TARGET} \