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

[RFC/PATCH] config.mak.in: remove unused definitions

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 3, 2013, 01:58 UTC
Message-ID
<7v1ucyb1k6.fsf@alter.siamese.dyndns.org>

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 a few "export", in addition to definitions of srcdir and VPATH.

These "export" logically does not belong there. The common 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, so if we want to get these exported, that should be in the main Makefile, no?

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 <gitster@pobox.com>
---
 * As everybody knows, I do not use autoconf/configure, so this may
   be breaking things for those who do.  Comments, objectsions, and
   general education etc. are very much appreciated.
 Makefile      | 2 +-
 config.mak.in | 7 -------
 2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 731b6a8..e946402 100644
--- a/Makefile
+++ b/Makefile
@@ -384,7 +384,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 e8a9bb4..f87c18c 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -11,7 +11,6 @@ DIFF = @DIFF@
 #INSTALL = @INSTALL@		# needs install-sh or install.sh in sources
 
 prefix = @prefix@
-exec_prefix = @exec_prefix@
 bindir = @bindir@
 gitexecdir = @libexecdir@/git-core
 datarootdir = @datarootdir@
@@ -19,9 +18,3 @@ template_dir = @datadir@/git-core/templates
 sysconfdir = @sysconfdir@
 
 mandir = @mandir@
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-export exec_prefix mandir
-export srcdir VPATH
Message 1 of 1 in “config.mak.in: remove unused definitions”
  1. config.mak.in: remove unused definitionsJunio C Hamano, Feb 3, 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.