From 699d2e0ed94bd545bb3dd8c64a3922f56f273f0e Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 3 Jan 2022 22:48:44 +0000 Subject: [PATCH] rc: simplify Makefile, use yacc default rule (thanks k0ga) --- sys/src/cmd/rc/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/src/cmd/rc/Makefile b/sys/src/cmd/rc/Makefile index 43e3a05e1..0abe5bc6d 100644 --- a/sys/src/cmd/rc/Makefile +++ b/sys/src/cmd/rc/Makefile @@ -17,7 +17,7 @@ OFILES=\ var.o\ havefork.o\ unix.o\ - y.tab.o\ + syn.o\ HFILES=rc.h\ y.tab.h\ @@ -27,6 +27,7 @@ HFILES=rc.h\ getflags.h\ YFILES=syn.y +YFLAGS=-d PREFIX=/usr/local @@ -39,13 +40,12 @@ install: $(TARG) rcmain.unix $(TARG): $(OFILES) $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARG) $(OFILES) -y.tab.h y.tab.c: $(YFILES) - $(YACC) -d $(YFILES) +y.tab.h: syn.c -unix.o: unix.c +unix.o: unix.c $(CC) $(CFLAGS) '-DPREFIX="$(PREFIX)"' -c unix.c $(OFILES): $(HFILES) clean: - rm -f $(OFILES) $(TARG) y.tab.? y.debug + rm -f $(OFILES) $(TARG) syn.c y.tab.? y.debug