Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | [PATCH] fix the YACC rule to fix a building failure |
| 2 | |
| 3 | Upstream-Statu: Pending |
| 4 | |
| 5 | The original rule will create the header file twice, one is that the header |
| 6 | file as the object file is created, other time is when create the C source file. |
| 7 | since YACC always has "-d" parameter. |
| 8 | |
| 9 | This lead to a race when compile amd_tok.o, the header file maybe rewritten. |
| 10 | |---------------------- |
| 11 | |amd_tok.l:359:10: error: 'RBRACKET' undeclared (first use in this function) |
| 12 | | ")" { return RBRACKET; } |
| 13 | | ^ |
| 14 | |../Makefile.rules:64: recipe for target 'amd_tok.o' failed |
| 15 | |---------------------- |
| 16 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
| 17 | --- |
| 18 | lib/Makefile | 6 ++++-- |
| 19 | modules/Makefile | 3 ++- |
| 20 | 2 files changed, 6 insertions(+), 3 deletions(-) |
| 21 | |
| 22 | diff --git a/lib/Makefile b/lib/Makefile |
| 23 | index 4798a4b..c40cf86 100644 |
| 24 | --- a/lib/Makefile |
| 25 | +++ b/lib/Makefile |
| 26 | @@ -57,7 +57,8 @@ mount_xdr.o: mount_xdr.c |
| 27 | master_tok.c: master_tok.l |
| 28 | $(LEX) -o$@ -Pmaster_ $? |
| 29 | |
| 30 | -master_parse.tab.c master_parse.tab.h: master_parse.y |
| 31 | +master_parse.tab.h: master_parse.tab.c |
| 32 | +master_parse.tab.c: master_parse.y |
| 33 | $(YACC) -v -d -p master_ -b master_parse $? |
| 34 | |
| 35 | master_tok.o: master_tok.c master_parse.tab.h |
| 36 | @@ -67,7 +68,8 @@ master_parse.tab.o: master_parse.tab.c master_parse.tab.h |
| 37 | nss_tok.c: nss_tok.l |
| 38 | $(LEX) -o$@ -Pnss_ $? |
| 39 | |
| 40 | -nss_parse.tab.c nss_parse.tab.h: nss_parse.y |
| 41 | +nss_parse.tab.h: nss_parse.tab.c |
| 42 | +nss_parse.tab.c: nss_parse.y |
| 43 | $(YACC) -v -d -p nss_ -b nss_parse $? |
| 44 | |
| 45 | nss_tok.o: nss_tok.c nss_parse.tab.h |
| 46 | diff --git a/modules/Makefile b/modules/Makefile |
| 47 | index 237b70b..71415d0 100644 |
| 48 | --- a/modules/Makefile |
| 49 | +++ b/modules/Makefile |
| 50 | @@ -103,7 +103,8 @@ amd_tok.c: amd_tok.l |
| 51 | |
| 52 | amd_tok.o: amd_tok.c amd_parse.tab.h |
| 53 | |
| 54 | -amd_parse.tab.c amd_parse.tab.h: amd_parse.y |
| 55 | +amd_parse.tab.h: amd_parse.tab.c |
| 56 | +amd_parse.tab.c: amd_parse.y |
| 57 | $(YACC) -v -d -p amd_ -b amd_parse $? |
| 58 | |
| 59 | amd_parse.tab.o: amd_parse.tab.c amd_parse.tab.h |
| 60 | -- |
| 61 | 1.9.1 |
| 62 | |