From patchwork Sat Sep 23 11:20:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christopher Li X-Patchwork-Id: 9967473 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1CD9A60353 for ; Sat, 23 Sep 2017 11:20:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A51229881 for ; Sat, 23 Sep 2017 11:20:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F32E029884; Sat, 23 Sep 2017 11:20:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DACBF29881 for ; Sat, 23 Sep 2017 11:20:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750839AbdIWLU3 (ORCPT ); Sat, 23 Sep 2017 07:20:29 -0400 Received: from mail-yw0-f174.google.com ([209.85.161.174]:50503 "EHLO mail-yw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750766AbdIWLU2 (ORCPT ); Sat, 23 Sep 2017 07:20:28 -0400 Received: by mail-yw0-f174.google.com with SMTP id u11so2220367ywh.7 for ; Sat, 23 Sep 2017 04:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=+Wv3le5rawxO4XKTK9f6Zugin1yXa25BeDvgg40b7MQ=; b=Iaqe4+CaiUcNbTB+w1C9BO/jjSIt7ACafcybV9p75uB7eLFd1MZdMz/1OMRoNB8/Em e+wQyQUxmuHNguYFUT7PVpJ3j9/Er2GkuX5JuehepiMOsii/LjNS6G2xpyWHKZwKKQV3 nhwlPgZHX7//HzxZILrXW3pjtyqhYPLOoccEXN3Quozb2SU898DMEv6NCMxLODkdh6l1 +EFejZ3G3o4iERawazX4Ldqx18dC1Hqmw2/RXXCMlAmSzQ38zWxrQBrSfzfLWEIR/Jbl e4leGB++L8WTwtIz1MPTy+wKo16tA454GOQn59kETa6WVWQI5hzzp1OGekgRIh65pziW pl5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=+Wv3le5rawxO4XKTK9f6Zugin1yXa25BeDvgg40b7MQ=; b=Sd7sr1hpxDi+ibg83BRjMX2hTNLR6Y0mbUbp2OwfClO/eBgHEaTofaxXGQKeF8SDOf WOXFZzbNYNDDcFbJTEUe5/TsUHKJ+gc2Jq2RDGGgCvGLOIyPXua5mhJbSiKDgn4EgHUB 3MFWEF5NBQE+rYNw/ObSXrJpJgvqImzi6ZdXZpuES3CkYH5OIvpTvPCx5ikgeV7d8YIz 2mDyYjAfn18VJVLFAygCl+cStEh5YtnQ/KboDFUkZGTOWzPvw/LjDZ3iBhop7G8zuvk/ en3a7dInLaAj+WE1pwRylNJ5PYFlSgDeoNWQvX8UfWxgByAhz2z6Kg+esOZrQyeKQHc3 cHAg== X-Gm-Message-State: AHPjjUiGQAxN7NwrPGnCSikO5w2uQJkbb99FxGYs5puUwk7jhmwYmxn5 XbdiaH0BPZvP6SkInkrpOyWWjLzERN02QGrygKcw X-Google-Smtp-Source: AOwi7QAnVy9OAQFeUumTN3iLaAO9cDaMURKyMPQuZZ2ZpOSVkTfQvJ5PNPJ7bzGa9rY4yZMjgiO/kNQDIHGK5pbA48I= X-Received: by 10.37.186.194 with SMTP id a2mr670398ybk.4.1506165627581; Sat, 23 Sep 2017 04:20:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.145.200 with HTTP; Sat, 23 Sep 2017 04:20:27 -0700 (PDT) In-Reply-To: <20170922212524.8095-1-uwe@kleine-koenig.org> References: <20170922212524.8095-1-uwe@kleine-koenig.org> From: Christopher Li Date: Sat, 23 Sep 2017 07:20:27 -0400 X-Google-Sender-Auth: i_GxLRpWDlChK3e8HGyzcFaAD5E Message-ID: Subject: Re: [PATCH] build: make PREFIX overwritable on the commandline To: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Cc: Linux-Sparse Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Sep 22, 2017 at 5:25 PM, Uwe Kleine-König wrote: > This way I can just use > > make install PREFIX=/usr > > on the command line to install sparse into the system. > > DESTDIR= > -PREFIX=$(HOME) > +PREFIX ?= $(HOME) Are you sure you need this patch to use "make install PREFIX=/usr" ? Variable that assign from the command line will ignore other normal assignment. You need to use override to assign to command line variables. This patch can show it: When I invoke with PREFIX=/usr/local/ $ make PREFIX=/usr/local/ clean prefix origin: command line value: /usr/local/ So your patch is not needed. Chris --- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Makefile b/Makefile index a4653aa1..868e7816 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,7 @@ endif DESTDIR= PREFIX=$(HOME) +$(info prefix origin: $(origin PREFIX) value: $(PREFIX)) BINDIR=$(PREFIX)/bin LIBDIR=$(PREFIX)/lib MANDIR=$(PREFIX)/share/man