shithub: rc

Download patch

ref: 3d2b7a569065bc43c32a7d58f6f73bbe114f6c5b
parent: 018aa5f60d26cea3f6e11f21395555a52f9703a4
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Jan 3 17:51:06 EST 2022

rc: simplify Makefile, use yacc default rule (thanks k0ga)

--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@
 	var.o\
 	havefork.o\
 	unix.o\
-	y.tab.o\
+	syn.o\
 
 HFILES=rc.h\
 	y.tab.h\
@@ -27,6 +27,7 @@
 	getflags.h\
 
 YFILES=syn.y
+YFLAGS=-d
 
 PREFIX=/usr/local
 
@@ -39,13 +40,12 @@
 $(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