blob: 8ad3b22de5a6cf1b33300771f11f70f11a1b1164 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From 971d48a00ef82880c34e89778bf430a01360ebd5 Mon Sep 17 00:00:00 2001
2From: Roy Li <rongqing.li@windriver.com>
3Date: Mon, 18 May 2015 16:28:36 +0800
4Subject: [PATCH] [PATCH] fix the YACC rule to fix a building failure
Patrick Williamsb48b7b42016-08-17 15:04:38 -05005
6Upstream-Statu: Pending
7
8The original rule will create the header file twice, one is that the header
9file as the object file is created, other time is when create the C source file.
10since YACC always has "-d" parameter.
11
12This lead to a race when compile amd_tok.o, the header file maybe rewritten.
13 |----------------------
14 |amd_tok.l:359:10: error: 'RBRACKET' undeclared (first use in this function)
15 | ")" { return RBRACKET; }
16 | ^
17 |../Makefile.rules:64: recipe for target 'amd_tok.o' failed
18 |----------------------
19Signed-off-by: Roy Li <rongqing.li@windriver.com>
Brad Bishop316dfdd2018-06-25 12:45:53 -040020
Patrick Williamsb48b7b42016-08-17 15:04:38 -050021---
22 lib/Makefile | 6 ++++--
23 modules/Makefile | 3 ++-
24 2 files changed, 6 insertions(+), 3 deletions(-)
25
Patrick Williamsb48b7b42016-08-17 15:04:38 -050026--- a/lib/Makefile
27+++ b/lib/Makefile
Andrew Geissler69721092021-07-23 12:57:00 -040028@@ -53,7 +53,8 @@ mount_xdr.o: mount_xdr.c
Patrick Williamsb48b7b42016-08-17 15:04:38 -050029 nss_tok.c: nss_tok.l
30 $(LEX) -o$@ -Pnss_ $?
31
32-nss_parse.tab.c nss_parse.tab.h: nss_parse.y
33+nss_parse.tab.h: nss_parse.tab.c
34+nss_parse.tab.c: nss_parse.y
35 $(YACC) -v -d -p nss_ -b nss_parse $?
36
37 nss_tok.o: nss_tok.c nss_parse.tab.h
Patrick Williamsb48b7b42016-08-17 15:04:38 -050038--- a/modules/Makefile
39+++ b/modules/Makefile
40@@ -103,7 +103,8 @@ amd_tok.c: amd_tok.l
41
42 amd_tok.o: amd_tok.c amd_parse.tab.h
43
44-amd_parse.tab.c amd_parse.tab.h: amd_parse.y
45+amd_parse.tab.h: amd_parse.tab.c
46+amd_parse.tab.c: amd_parse.y
47 $(YACC) -v -d -p amd_ -b amd_parse $?
48
49 amd_parse.tab.o: amd_parse.tab.c amd_parse.tab.h
Andrew Geissler69721092021-07-23 12:57:00 -040050--- a/daemon/Makefile
51+++ b/daemon/Makefile
52@@ -16,7 +16,7 @@ YACCSRC = master_tok.c master_parse.tab.
53 version := $(shell cat ../.version)
54
55 CFLAGS += -rdynamic $(DAEMON_CFLAGS) -D_GNU_SOURCE -I../include
56-CFLAGS += -DAUTOFS_LIB_DIR=\"$(autofslibdir)\"
57+CFLAGS += -DAUTOFS_LIB_DIR=\"$(autofslibdir)\"
58 CFLAGS += -DAUTOFS_MAP_DIR=\"$(autofsmapdir)\"
59 CFLAGS += -DAUTOFS_CONF_DIR=\"$(autofsconfdir)\"
60 CFLAGS += -DAUTOFS_FIFO_DIR=\"$(autofsfifodir)\"
61@@ -44,7 +44,8 @@ automount: $(OBJS) $(AUTOFS_LIB)
62 master_tok.c: master_tok.l
63 $(LEX) -o$@ -Pmaster_ $?
64
65-master_parse.tab.c master_parse.tab.h: master_parse.y
66+master_parse.tab.h: master_parse.tab.c
67+master_parse.tab.c: master_parse.y
68 $(YACC) -v -d -p master_ -b master_parse $?
69
70 master_tok.o: master_tok.c master_parse.tab.h
71@@ -57,5 +58,3 @@ clean:
72 install: all
73 install -d -m 755 $(INSTALLROOT)$(sbindir)
74 install -c automount -m 755 $(INSTALLROOT)$(sbindir)
75-
76-