xref: /OK3568_Linux_fs/buildroot/package/at/0004-Makefile-fix-parallel-build-failure.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 3ace0b57e2aacb784c01a3c7694c6c92461937ff Mon Sep 17 00:00:00 2001
2From: Giulio Benetti <giulio.benetti@benettiengineering.com>
3Date: Thu, 20 Feb 2020 22:00:11 +0100
4Subject: [PATCH] Makefile: fix parallel build failure
5
6At the moment parallel build fails due to 2 causes:
71) parsetime.l tries to include incomplete y.tab.h, since y.tab.h is the
8result of yacc -d parsetime.y
92) when compiling y.tab.c, y.tab.c itself is not complete, since it is
10the result of yacc -d parsetime.y
11
12So fix it by:
131) making parsetime.l to wait for y.tab.h to be created by yacc
142) waiting for y.tab.c and y.tab.h to be created before compile them
15
16Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
17---
18 Makefile.in | 3 +++
19 1 file changed, 3 insertions(+)
20
21diff --git a/Makefile.in b/Makefile.in
22index 4c11913..57c3a0c 100644
23--- a/Makefile.in
24+++ b/Makefile.in
25@@ -83,6 +83,8 @@ y.tab.c y.tab.h: parsetime.y
26 lex.yy.c: parsetime.l
27 	$(LEX) -i parsetime.l
28
29+parsetime.l: y.tab.h
30+
31 atd.service: atd.service.in
32 	cat $< | sed -e 's![@]sbindir[@]!$(sbindir)!g' | sed -e 's![@]atjobdir[@]!$(atjobdir)!g' > $@
33
34@@ -173,3 +175,4 @@ perm.o: perm.c config.h privs.h at.h
35 posixtm.o: posixtm.c posixtm.h
36 daemon.o: daemon.c config.h daemon.h privs.h
37 getloadavg.o: getloadavg.c config.h getloadavg.h
38+y.tab.o: y.tab.c y.tab.h
39--
402.20.1
41
42