From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 9712A1F403 for ; Tue, 4 Oct 2022 08:41:13 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; secure) header.d=web.de header.i=@web.de header.b="VdklDZTq"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbiJDIlB (ORCPT ); Tue, 4 Oct 2022 04:41:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230238AbiJDIks (ORCPT ); Tue, 4 Oct 2022 04:40:48 -0400 Received: from mout.web.de (mout.web.de [212.227.17.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4829429361 for ; Tue, 4 Oct 2022 01:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1664872842; bh=nj9VpHgL9omhRr7gmvmWCytmNwmIyTIO4cJ9DSy+b14=; h=X-UI-Sender-Class:References:In-Reply-To:From:Date:Subject:To:Cc; b=VdklDZTqIy9rhnYeAVMx5FR0y5WKC7/XxHWF/maKn37U1lWsEwn3lsMtWfJAL5zJO vbRiwkSfnnIy6P/i5BagbDr8/S3eTZnxknihlqT+K1zWhQ95BP8qDFI6MqaI/j0PnU 9Dso9oFpIgyIyLqqTlCzTSfw8UUnzAi01QIKTSKDSosSJ4grkFWpa4z/5v4MI+Dunm L5YTufqoh7ljIqgRXUU42GeQaqEaEhxw/4jbuQpjDOy9MTufMav+L+b/A3Z5gX7r7T HvR/YyG3w7uQeWmgde1fB3UDG3N/l1pF68x8eYdjVGbc0uL1URnhs+hONeGyxr42bU WLUUvEbQgy5IQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from mail-oi1-f175.google.com ([209.85.167.175]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MODmV-1oqHXk3eif-00OTHl for ; Tue, 04 Oct 2022 10:40:42 +0200 Received: by mail-oi1-f175.google.com with SMTP id q10so13768478oib.5 for ; Tue, 04 Oct 2022 01:40:41 -0700 (PDT) X-Gm-Message-State: ACrzQf0KzYkC4eSugPgiF/c5r64kEbi5v2e06XBVYloUJEiXG9rFEu7Z 267YZaGlK27y5c4hSF7G6Tw3w8IvI2zODKZDO2M= X-Google-Smtp-Source: AMsMyM42iLHvO0ctq9eqn5p2sJmEVjhE5rYa41+DsBoXgY6Za1UCxp/3DmcWMKEiJ/zazH3m2Cxv1tjhdvSep/eZr6M= X-Received: by 2002:a05:6808:10c3:b0:350:e563:7c4a with SMTP id s3-20020a05680810c300b00350e5637c4amr5541944ois.182.1664872840520; Tue, 04 Oct 2022 01:40:40 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: darkdragon Date: Tue, 4 Oct 2022 10:40:24 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Install-prefix when building should not be hardcoded To: =?UTF-8?B?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Cc: git@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:XQSXzXMKLPCZDoNB0N4h3D1pv06fiMHTyKi+T7fQy1M9zdUINR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UAWlqd1t5kQD5f9kjJVQeiTLCOZju7muuxPdxxJ xk/OMXVUeFEd0Kl3oVpvkyy2q48wLjBPqDGv/wEohLLZB2J4tpn9TjBPCz1ZhV0kyjVC0cV5P dkQYhYhFlDkKmwGfm5ocVAgNZDPQhRoXKTmUMhTjdqtGOsuc9QYY5sT2hKh4ErB56zcRVbTpV GXNntnUa5u33T3LjwHbg5ibXjp3fJ3flN1MAEDVHIB4TeScQaiQslA8egQJ06wgYelPxMxzEi 5UkfUNM1bcsr5TDOl/2+PzrwsIgK7z/BIvjl7dv4prYdVE+vUhHe1K8qdNv/9h9lL5flEJvU/ g+ftmVQvHPVi6GCTe5bsGwI3Cl Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Thanks for the hint to DESTDIR, it helps! Nevertheless, I would like to point towards the following section in the [MAKEFILE][1]: ```Makefile # Among the variables below, these: # gitexecdir # ... # can be specified as a relative path some/where/else; # this is interpreted as relative to $(prefix) and "git" at # runtime figures out where they are based on the path to the executable. # ... # This can help installing the suite in a relocatable way. # ... gitexecdir =3D libexec/git-core ``` [1]: https://github.com/git/git/blob/master/Makefile#L525-L547 On Tue, Oct 4, 2022 at 9:57 AM =C4=90o=C3=A0n Tr=E1=BA=A7n C=C3=B4ng Danh <= congdanhqx@gmail.com> wrote: > > On 2022-10-04 09:38:24+0200, darkdragon wrote: > > Even though in Makefile, it is stated that git will figure out > > gitexecdir at runtime based on the path to the executable, there are > > many output files where $(prefix) will be hardcoded. Even git > > --exec-path will print out $(compile_prefix)/libexec/git-core instead > > of using run_prefix. > > I'm not sure about this part. > > > Example: We are building git in Docker at a separate stage to /deploy > > (since /usr/local is populated with our compiler toolchain). The final > > image is assembled by copying the contents of /deploy to /usr/local. > > Commands like "git submodule" will fail because of the wrong git exec > > path. Searching via "grep -r /deploy" in /deploy after make install > > yields many results. > > But you may be interested in $(DESTDIR) > > make prefix=3D/usr/local all > make prefix=3D/usr/local DESTDIR=3D/deploy install > > Does that work for you? > > -- > Danh