diff --git a/nemu/scripts/build.mk b/nemu/scripts/build.mk index 0a04409..07c3c79 100644 --- a/nemu/scripts/build.mk +++ b/nemu/scripts/build.mk @@ -42,13 +42,11 @@ $(OBJ_DIR)/%.o: %.cc $(OBJ_DIR)/%.tag.c: %.y @echo + YACC $< - @echo $@ $< @mkdir -p $(dir $@) @$(YACC) $(YFLAGS) --header=$(<:.y=.h) -o $@ $< $(OBJ_DIR)/%.yy.c: %.l $(OBJ_DIR)/%.tag.c @echo + LEX $< - @echo $@ $< @mkdir -p $(dir $@) @$(LEX) $(LFLAGS) -o $@ $< diff --git a/nemu/src/monitor/sdb/filelist.mk b/nemu/src/monitor/sdb/filelist.mk index bad7396..394a8a3 100644 --- a/nemu/src/monitor/sdb/filelist.mk +++ b/nemu/src/monitor/sdb/filelist.mk @@ -1,13 +1,3 @@ SRCS-y += src/monitor/sdb/addrexp.tag.c src/monitor/sdb/addrexp.yy.c INC_PATH += src/monitor/sdb LFLAGS += -DYY_NO_UNPUT -DYY_NO_INPUT - -$(BUILD_DIR)/src/monitor/sdb/addr-exp.c: src/monitor/sdb/addr-exp.y - @echo + YACC $< - @mkdir -p $(dir $@) - @$(YACC) $(YFLAGS) --header=$(<:.y=.h) -o $@ $< - -$(BUILD_DIR)/src/monitor/sdb/addr-lex.c: src/monitor/sdb/addr-lex.l $(BUILD_DIR)/src/monitor/sdb/addr-exp.c - @echo + LEX $< - @mkdir -p $(dir $@) - @$(LEX) $(LFLAGS) -o $@ $< diff --git a/nemu/src/monitor/sdb/sdb.c b/nemu/src/monitor/sdb/sdb.c index b1e3ae0..23218d5 100644 --- a/nemu/src/monitor/sdb/sdb.c +++ b/nemu/src/monitor/sdb/sdb.c @@ -286,8 +286,6 @@ void sdb_mainloop() { cmd_c(NULL); return; } - // int res = yyparse(); - // exit(res); for (char *str; (str = rl_gets()) != NULL;) { char *str_end = str + strlen(str);