diff mbox

[RFC,v1,12/14] autoconf: fix out-of-tree build

Message ID 1358725943-31485-13-git-send-email-thomas.petazzoni@free-electrons.com
State Changes Requested
Headers show

Commit Message

Thomas Petazzoni Jan. 20, 2013, 11:52 p.m. UTC
Even though one might think that autoconf should have been the best
example of a clean and nice example of a correct out of tree build
implementation, this is not the case. The autoconf build process makes
modification to the source tree, for some obscure updating process of
manual pages.

For now, we workaround this problem by re-adding write permissions on
the man/ subdirectory of autoconf sources, but on the long term, a
proper, upstreamable solution would be better.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/autoconf/autoconf.mk |   10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox

Patch

diff --git a/package/autoconf/autoconf.mk b/package/autoconf/autoconf.mk
index 8807c10..e77bb54 100644
--- a/package/autoconf/autoconf.mk
+++ b/package/autoconf/autoconf.mk
@@ -20,6 +20,16 @@  HOST_AUTOCONF_CONF_ENV = ac_cv_path_M4=$(HOST_DIR)/usr/bin/m4 \
 
 HOST_AUTOCONF_DEPENDENCIES = host-m4 host-libtool
 
+# The autoconf build process writes to its source directory, which is
+# very stupid, but forces us to give write permissions to one
+# directory.
+define AUTOCONF_FIXUP_PERMISSIONS
+	chmod u+w -R $(AUTOCONF_SRCDIR)/man
+endef
+
+AUTOCONF_PRE_CONFIGURE_HOOKS += AUTOCONF_FIXUP_PERMISSIONS
+HOST_AUTOCONF_PRE_CONFIGURE_HOOKS += AUTOCONF_FIXUP_PERMISSIONS
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))