Skip to content

Commit 6e97dc1

Browse files
committed
Fix rules for syscall parser again
The patch from b799d99 did not always work
1 parent 5ff6fef commit 6e97dc1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ syscall/SRCFILES.traps
125125
syscall/gen-syscall
126126
syscall/pars.h
127127
syscall/syscalls.stmp
128+
syscall/pars.c
129+
syscall/scan.c
130+
syscall/.stmp.pars
128131
time/test-clock
129132
time/test-getdate
130133
time/test-mktime

syscall/Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ include $(top_srcdir)/checkrules
3737
cflags = -O -Wall
3838
type =
3939

40+
# FIXME: adjust rules in toplevel to cleanup .stmp.pars, syscalls.stmp and other generated files
41+
4042
syscalls.stmp: gen-syscall0 syscalls.master
4143
echo "TRAPS=" > SRCFILES.traps
4244
./gen-syscall syscalls.master
@@ -48,15 +50,16 @@ gen-syscall0:
4850
gen-syscall: $(gen_objs)
4951
$(CC) $(gen_objs) -o $@
5052

51-
pars.c pars.h: pars.y
52-
if bison --defines=pars.h.tmp$$$$ --output=pars.c $<; then mv pars.h.tmp$$$$ pars.h; else rm -f pars.h.tmp$$$$; exit 1; fi
53+
pars.c pars.h .stmp.pars: pars.y
54+
bison --defines=pars.h --output=pars.c $<
55+
touch .stmp.pars
5356

54-
pars.o: pars.c pars.h
57+
pars.o: pars.c pars.h .stmp.pars
5558

5659
scan.c: scan.l
5760
flex -o$@ $<
5861

59-
scan.o: scan.c pars.h
62+
scan.o: scan.c pars.h .stmp.pars
6063

6164
install: all-here
6265

0 commit comments

Comments
 (0)