fix macro_hooks patch
[nedit-bw.git] / fix-parse_c-build-rule.patch
blobfecf985796b6ccd257bc83c767ff0947d47eefe8
1 ---
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 $@
12 clean:
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
16 parse.c: parse.y
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; \
28 + else \
29 + echo "No bison or yacc found on your system" >&2; \
30 + false; \
31 + fi
33 # Get the dependencies for all objects
34 include Makefile.dependencies