From d8cf908cb6012cd4dc3d1089a849daf646150c2e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 2 Feb 2013 17:58:49 -0800 Subject: config.mak.in: remove unused definitions When 5566771 (autoconf: Use autoconf to write installation directories to config.mak.autogen, 2006-07-03) introduced support for autoconf generated config.mak file, it added an "export" for a few common makefile variables, in addition to definitions of srcdir and VPATH. The "export" logically does not belong there. The make variables like mandir, prefix, etc, should be exported to submakes for people who use config.mak and people who use config.mak.autogen the same way; if we want to get these exported, that should be in the main Makefile. We do use mandir and htmldir in Documentation/Makefile, so let's add export for them in the main Makefile instead. We may eventually want to support VPATH, and srcdir may turn out to be useful for that purpose, but right now nobody uses it, so it is useless to define them in this file. Signed-off-by: Junio C Hamano --- Makefile | 2 +- config.mak.in | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 26b697d17..1dae2c5bf 100644 --- a/Makefile +++ b/Makefile @@ -359,7 +359,7 @@ lib = lib # DESTDIR= pathsep = : -export prefix bindir sharedir sysconfdir gitwebdir localedir +export prefix bindir sharedir mandir htmldir sysconfdir gitwebdir localedir CC = cc AR = ar diff --git a/config.mak.in b/config.mak.in index 802d34223..947ca5776 100644 --- a/config.mak.in +++ b/config.mak.in @@ -13,7 +13,6 @@ DIFF = @DIFF@ TCLTK_PATH = @TCLTK_PATH@ prefix = @prefix@ -exec_prefix = @exec_prefix@ bindir = @bindir@ gitexecdir = @libexecdir@/git-core datarootdir = @datarootdir@ @@ -22,12 +21,6 @@ sysconfdir = @sysconfdir@ mandir=@mandir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -export exec_prefix mandir -export srcdir VPATH - NEEDS_SSL_WITH_CRYPTO=@NEEDS_SSL_WITH_CRYPTO@ NO_OPENSSL=@NO_OPENSSL@ NO_CURL=@NO_CURL@ -- cgit v1.2.1 From c09d62f5635928ab20909cb650b621f7520b56fb Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 12 Feb 2013 15:02:13 -0800 Subject: Makefile: do not export mandir/htmldir/infodir These are defined in the main Makefile to be funny values that are optionally relative to an unspecified location that is determined at runtime. They are only suitable for hardcoding in the binary via the -DGIT_{MAN,HTML,INFO}_PATH= C preprocessor options, and are not real paths, contrary to what any sane person, and more importantly, the Makefile in the documentation directory, would expect. A longer term fix is to introduce runtime_{man,html,info}dir variables to hold these funny values, and make {man,html,info}dir variables to have real paths whose default values begin with $(prefix), but as a first step, stop exporting them from the top-level Makefile Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1dae2c5bf..26b697d17 100644 --- a/Makefile +++ b/Makefile @@ -359,7 +359,7 @@ lib = lib # DESTDIR= pathsep = : -export prefix bindir sharedir mandir htmldir sysconfdir gitwebdir localedir +export prefix bindir sharedir sysconfdir gitwebdir localedir CC = cc AR = ar -- cgit v1.2.1 From b4eead95e0c207e4f0492298d795674da119f684 Mon Sep 17 00:00:00 2001 From: Kirill Smelkov Date: Tue, 5 Mar 2013 16:43:25 +0400 Subject: Fix `make install` when configured with autoconf 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 Signed-off-by: Junio C Hamano --- config.mak.in | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.in b/config.mak.in index 947ca5776..515a4aa82 100644 --- a/config.mak.in +++ b/config.mak.in @@ -13,6 +13,7 @@ DIFF = @DIFF@ TCLTK_PATH = @TCLTK_PATH@ prefix = @prefix@ +exec_prefix = @exec_prefix@ bindir = @bindir@ gitexecdir = @libexecdir@/git-core datarootdir = @datarootdir@ -- cgit v1.2.1