From: Christian Storm <
christi...@siemens.com>
Quoting [1]:
"We recommend that you avoid using -l options in LDADD or
prog_LDADD when referring to libraries built by your package.
Instead, write the file name of the library explicitly as in the
above cpio example. Use -l only to list third-party libraries. If
you follow this rule, the default value of prog_DEPENDENCIES will
list all your local libraries and omit the other ones."
Hence, remove bg_setenv_DEPENDENCIES and explicitly specify
libebgenv.a in bg_setenv_LDADD.
[1]
https://www.gnu.org/software/automake/manual/html_node/Linking.html#Linking
Signed-off-by: Christian Storm <
christi...@siemens.com>
---
This solves the incremental build issue on Nix as per Michael's
repro steps. There's no breakage on AARCH64 and x86/64 with
in-tree as well as off-tree builds. So, the hope is that the last
patch adding -static to bg_setenv_CFLAGS plus this one is it.
Please test :)
Makefile.am | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 2a5f8f8..73af2f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -110,12 +110,9 @@ bg_setenv_CFLAGS = \
$(AM_CFLAGS) -static
bg_setenv_LDADD = \
- -lebgenv \
+ $(top_builddir)/libebgenv.a \
-lz
-bg_setenv_DEPENDENCIES = \
- libebgenv.a
-
install-exec-hook:
$(AM_V_at)$(LN_S) -f bg_setenv$(EXEEXT) \
$(DESTDIR)$(bindir)/bg_printenv$(EXEEXT)
--
2.33.1