git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix `make install` when configured with autoconf

From
Kirill Smelkov <kirr@mns.spb.ru>
Date
Mar 5, 2013, 12:43 UTC
Message-ID
<1362487405-32044-1-git-send-email-kirr@mns.spb.ru>
Commit d8cf908c (config.mak.in: remove unused definitions) removed
    exec_prefix = @exec_prefix@

from config.mak.in, because nobody directly used ${exec_prefix}, but overlooked that other autoconf definitions could indirectly expand that variable.

For example the following snippet from config.mak.in
    prefix = @prefix@
    bindir = @bindir@
    gitexecdir = @libexecdir@/git-core
    datarootdir = @datarootdir@
    template_dir = @datadir@/git-core/templates
    sysconfdir = @sysconfdir@
is expanded to
    prefix = /home/kirr/local/git
    bindir = ${exec_prefix}/bin                             <-- HERE
    gitexecdir = ${exec_prefix}/libexec/git-core            <--
    datarootdir = ${prefix}/share
    template_dir = ${datarootdir}/git-core/templates
    sysconfdir = ${prefix}/etc
on my system, after `configure --prefix=$HOME/local/git`

and withot exec_prefix being defined there I get an error on install:

    install -d -m 755 '/bin'
    install -d -m 755 '/libexec/git-core'
    install: cannot create directory `/libexec': Permission denied
    Makefile:2292: recipe for target `install' failed
Fix it.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
---
 config.mak.in | 1 +
 1 file changed, 1 insertion(+)
diff --git a/config.mak.in b/config.mak.in
index 7440687..e6a6d0f 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -12,6 +12,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 #INSTALL = @INSTALL@		# needs install-sh or install.sh in sources
 
 prefix = @prefix@
+exec_prefix = @exec_prefix@
 bindir = @bindir@
 gitexecdir = @libexecdir@/git-core
 datarootdir = @datarootdir@
-- 
1.8.2.rc2.353.gd2380b4
Next: Junio C Hamano
Message 1 of 2 in “Fix `make install` when configured with autoconf”
  1. Fix `make install` when configured with autoconfKirill Smelkov, Mar 5, 2013
  2. Junio C HamanoMar 5, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.