From patchwork Wed Nov 16 16:33:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Kolesov X-Patchwork-Id: 695682 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from helium.openadk.org (helium.openadk.org [89.238.66.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tJqZg5Qtfz9t1C for ; Thu, 17 Nov 2016 03:33:45 +1100 (AEDT) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id B79A61015B; Wed, 16 Nov 2016 17:33:40 +0100 (CET) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from smtprelay.synopsys.com (smtprelay2.synopsys.com [198.182.60.111]) by helium.openadk.org (Postfix) with ESMTPS id 2568710158 for ; Wed, 16 Nov 2016 17:33:32 +0100 (CET) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id BAF4110C1352 for ; Wed, 16 Nov 2016 08:33:29 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 755A8211; Wed, 16 Nov 2016 08:33:29 -0800 (PST) Received: from akolesov-lab.internal.synopsys.com (akolesov-lab.internal.synopsys.com [10.121.8.134]) by mailhost.synopsys.com (Postfix) with ESMTP id 2217020A; Wed, 16 Nov 2016 08:33:27 -0800 (PST) From: Anton Kolesov To: devel@uclibc-ng.org Date: Wed, 16 Nov 2016 19:33:24 +0300 Message-Id: <1479314004-17417-1-git-send-email-Anton.Kolesov@synopsys.com> X-Mailer: git-send-email 2.8.1 Cc: Vineet Gupta , Alexey Brodkin , Francois Bedard Subject: [uclibc-ng-devel] [PATCH] Fix extra/locale/gen_wc_8bit error with out-of-tree builds X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" If uClibc is built outside of the source tree, then there is an error: make[1]: *** No rule to make target `/home/akolesov/build-uclibc/extra/locale', needed by `/home/akolesov/build-uclibc/extra/locale/gen_wc8bit'. Stop. The rule to create $(top_builddir)/extra/locale is defined in top-level Makefile.in. Same Makefile.in also invokes extra/locale/Makefile.in to build various tools. Those tools have $(top_builddir)/extra/locale as a dependency, but this makefile doesn't include top-level Makefile.in, therefore rule to create dependant directory is absent in this submake invocation. To avoid this problem this patch defines $(top_builddir)/extra/locale as a dependency for "headers" target, which invokes extra/locale/Makefile.in, thus making sure that prerequisite directory is created in advance. This problem doesn't occur when building in the source tree, since $(top_builddir) == $(top_srcdir), so this directory already exists. Signed-off-by: Anton Kolesov --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 76008a2..98c6d6d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -183,7 +183,7 @@ menuconfig-clean-y: HEADERCLEAN_config # libc/sysdeps/linux/Makefile.commonarch to headers-y headers-y += $(target-headers-sysdep) -headers: $(top_builddir)include/bits/uClibc_config.h | subdirs +headers: $(top_builddir)include/bits/uClibc_config.h | subdirs $(top_builddir)extra/locale $(Q)$(if $(UCLIBC_HAS_LOCALE),$(MAKE) -C extra/locale locale_headers) subdirs: $(addprefix $(top_builddir),$(subdirs))