json-c: drop host-autoconf dependency
authorBaruch Siach <baruch@tkos.co.il>
Wed, 29 Aug 2018 04:07:09 +0000 (07:07 +0300)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 29 Aug 2018 05:21:36 +0000 (07:21 +0200)
It turns out that the configure script attempts to run autoheader
because the configure.ac timestamp is slightly later than that of
config.h.in. Update the config.h.in timestamp after tarball extract to
avoid autoheader run. With that we can drop the host-autoconf
dependency.

Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/json-c/json-c.mk

index bee57577ceec13130f0d270145a44cb4e1804467..2788fe563bd5a962a749b5551e76797d07b4e9f1 100644 (file)
@@ -10,9 +10,13 @@ JSON_C_INSTALL_STAGING = YES
 JSON_C_LICENSE = MIT
 JSON_C_LICENSE_FILES = COPYING
 
-# configure requires autoheader
-JSON_C_DEPENDENCIES = host-autoconf
-HOST_JSON_C_DEPENDENCIES = host-autoconf
+# update config.h.in timestamp to avoid autoheader run
+define JSON_C_UPDATE_CONFIG_TIMESTAMP
+       touch $(@D)/config.h.in
+endef
+
+JSON_C_POST_EXTRACT_HOOKS += JSON_C_UPDATE_CONFIG_TIMESTAMP
+HOST_JSON_C_POST_EXTRACT_HOOKS += JSON_C_UPDATE_CONFIG_TIMESTAMP
 
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))