summaryrefslogtreecommitdiff
path: root/net-im/bitlbee-facebook/files/bitlbee-facebook-1.2.2-fix-make-deps.patch
blob: 458302a06ab803c6b5cee72b0e1a96b29d07916e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From b63e0697ee6809e7460ebc4918c72fb99b256bba Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyich@gmail.com>
Date: Sun, 27 Nov 2022 17:15:37 +0000
Subject: [PATCH] facebook/Makefile.am: add generated files to BUILT_SOURCES

Without the change there is no giarantee that facebook-marshal.h
gets built before it's dependencies. On `make-4.4` `--shuffle` is
able to catch missing dependency as:

    $ make --shuffle
      CC       facebook_la-facebook-mqtt.lo
    facebook-mqtt.c:23:10: fatal error: facebook-marshal.h: No such file or directory
       23 | #include "facebook-marshal.h"
          |          ^~~~~~~~~~~~~~~~~~~~

Automake's BUILT_SOURCES builds all sources before first object file.
The change pulls it there.

Before the change 1-2 builds triggered `make --shuffle` failure.
After the change 20 sequential rebuilds succeeded without failures.

Upstream-PR: https://github.com/bitlbee/bitlbee-facebook/pull/217

diff --git a/facebook/Makefile.am b/facebook/Makefile.am
index 779abbe..f28bf4e 100644
--- a/facebook/Makefile.am
+++ b/facebook/Makefile.am
@@ -38,6 +38,10 @@ facebook_la_LDFLAGS += -module -avoid-version
 EXTRA_DIST = \
 	marshaller.list
 
+BUILT_SOURCES = \
+	facebook-marshal.c \
+	facebook-marshal.h
+
 CLEANFILES = \
 	facebook-marshal.c \
 	facebook-marshal.h