3 source/Makefile.common | 17 +++++++++++------
4 1 file changed, 11 insertions(+), 6 deletions(-)
6 diff --quilt old/source/Makefile.common new/source/Makefile.common
7 --- old/source/Makefile.common
8 +++ new/source/Makefile.common
9 @@ -38,14 +38,19 @@ highlightData.o: highlightData.c
10 $(CC) $(CFLAGS) $(BIGGER_STRINGS) -c highlightData.c -o $@
13 - rm -f $(OBJS) nedit nc nc.o parse.c linkdate.o
14 + rm -f $(OBJS) nedit nc nc.o parse.c parse_noyacc.c linkdate.o
17 - @echo "NOTE: Don't worry about 'command not found' errors here"
18 - @echo " unless you have changed the parse.y file."
19 - bison -o parse.c parse.y || ( yacc parse.y && mv y.tab.c parse.c ) || \
20 - cp parse_noyacc.c parse.c
22 + @if type bison >/dev/null 2>&1; then \
23 + echo bison -o parse.c parse.y; \
24 + bison -o parse.c parse.y; \
25 + elif type yacc >/dev/null 2>&1; then \
26 + echo "yacc parse.y && mv y.tab.c parse.c"; \
27 + yacc parse.y && mv y.tab.c parse.c; \
29 + echo "No bison or yacc found on your system" >&2; \
33 # Get the dependencies for all objects
34 include Makefile.dependencies