Skip to contentSkip to conversation

pacakge/dieharder: fix autoreconf

PATCH New Yann E. MORIN 2 participants 2 messages Apr 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pacakge/dieharder: fix autoreconf

When dieharder was committed, Thomas reoved the hook to cleanup the m4 files, on the reason that autoreconf would rereate the broken symlinks (and because the hook was too complex).

It turns out the hook was needed: autoreconf does not recreate the files (at least not in some autobuilders nor on my machine).

Reinstate a simpler hook.

Fixes:

    http://autobuild.buildroot.org/results/a92/a92e9a74b0966f8f0bc4080f918d5ddf4c1ec0ce/
    http://autobuild.buildroot.org/results/a4f/a4f6647f69ad89ff1ffe5f1331281fb7a57ade4e/
Cc Thomas Petazzoni <[email protected]>
Cc Julien Viard de Galbert <[email protected]>
---
 package/dieharder/dieharder.mk | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
package/dieharder/dieharder.mk +7 -3
index 05ca253..c3eee64 100644
@@ -15,13 +15,17 @@ DIEHARDER_DEPENDENCIES = gsl
 # The original configure does not use variables provided in the
 # environment so _CONF_ENV does not work. (_CONF_OPTS does).
 #
-# In addition, the m4/*.m4 files are symlinks to /usr/share, which
-# clearly doesn't work, so doing an autoreconf replaces them.
-#
 # Finally, we patch configure.ac and some Makefile.am so we need to
 # autoreconf anyway
 DIEHARDER_AUTORECONF = YES
 
+# The m4/*.m4 files are symlinks to /usr/share, which clearly doesn't
+# work, and doing an autoreconf does not replace them.
+define DIEHARDER_M4_CLEAN
+	rm -f $(@D)/m4/*.m4
+endef
+DIEHARDER_POST_PATCH_HOOKS += DIEHARDER_M4_CLEAN
+
 # fix endianness detection
 ifeq ($(BR2_ENDIAN),"BIG")
 DIEHARDER_CONF_ENV = ac_cv_c_endian=big
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/1 pacakge/dieharder: fix autoreconf

Hello,

Quoted 13 lines · Yann E. MORIN

When dieharder was committed, Thomas reoved the hook to cleanup the m4 files, on the reason that autoreconf would rereate the broken symlinks (and because the hook was too complex).

It turns out the hook was needed: autoreconf does not recreate the files (at least not in some autobuilders nor on my machine).

Reinstate a simpler hook.

Fixes:

    http://autobuild.buildroot.org/results/a92/a92e9a74b0966f8f0bc4080f918d5ddf4c1ec0ce/
    http://autobuild.buildroot.org/results/a4f/a4f6647f69ad89ff1ffe5f1331281fb7a57ade4e/
Quoted 6 lines
Cc Thomas Petazzoni <[email protected]>
Cc Julien Viard de Galbert <[email protected]>
---
 package/dieharder/dieharder.mk | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Applied to master after fixing a few typoes, and adjusting the commit log/comments with the fact that it was indeed working for me because I had libtool installed. So the problem is not just the fact that the symlinks are not overwritten by autoreconf, but that they are not overwritten if they are broken symbolic links in the first place.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com