From patchwork Sat Nov 19 21:00:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 126619 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C928AB7235 for ; Sun, 20 Nov 2011 08:02:16 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RRs1H-0000fG-EM; Sat, 19 Nov 2011 21:00:15 +0000 Received: from smtp.gentoo.org ([140.211.166.183]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RRs1E-0000eh-3J for linux-mtd@lists.infradead.org; Sat, 19 Nov 2011 21:00:13 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id D31A41B4025 for ; Sat, 19 Nov 2011 21:00:07 +0000 (UTC) From: Mike Frysinger To: linux-mtd@lists.infradead.org Subject: [PATCH] Makefile: fix install target with out-of-tree builds Date: Sat, 19 Nov 2011 16:00:07 -0500 Message-Id: <1321736407-8801-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.6.1 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -5.4 (-----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-5.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [140.211.166.183 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The install target always looks for the compiled binaries in the working directory which breaks when doing something like `make CHOST=... install`. Signed-off-by: Mike Frysinger --- Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d0bc3d6..4b71b8f 100644 --- a/Makefile +++ b/Makefile @@ -58,9 +58,9 @@ endif rm -f $(BUILDDIR)/include/version.h $(MAKE) -C $(TESTS) clean -install:: ${BINS} ${SCRIPTS} +install:: $(addprefix $(BUILDDIR)/,${BINS}) ${SCRIPTS} mkdir -p ${DESTDIR}/${SBINDIR} - install -m 0755 ${BINS} ${SCRIPTS} ${DESTDIR}/${SBINDIR}/ + install -m 0755 $^ ${DESTDIR}/${SBINDIR}/ mkdir -p ${DESTDIR}/${MANDIR}/man1 gzip -9c mkfs.jffs2.1 > ${DESTDIR}/${MANDIR}/man1/mkfs.jffs2.1.gz