@matheusbsbs / matheus-bagliano / commits / 556677144b
Fork 0

autoconf: Use autoconf to write installation directories to config.mak.autogen

This is beginning of patch series introducing installation configuration using autoconf (and no other autotools) to git. The idea is to generate config.mak.autogen using ./configure (generated from configure.ac by running autoconf) from config.mak.in, so one can use autoconf as an _alternative_ to ordinary Makefile, and creating one's own config.mak. Local settings in config.mak override generated settings in config.mak.autogen This patch includes minimal configure.ac and config.mak.in, so one can set installation directories using autoconf generated ./configure script e.g. ./configure --prefix=/usr Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jakub Narebski committed Jul 3, 2006 at 01:56 UTC 556677144b55aad8457851a9019e86c3676bd422
5 files changed +48
.gitignore
+6
@@ -135,4 +135,10 @@ git-core.spec
135 *.[ao]
136 *.py[co]
137 config.mak
138 +autom4te.cache
139 +config.log
140 +config.status
141 +config.mak.in
142 +config.mak.autogen
143 +configure
144 git-blame
INSTALL
+9
@@ -13,6 +13,15 @@ that uses $prefix, the built results have some paths encoded,
13 which are derived from $prefix, so "make all; make prefix=/usr
14 install" would not work.
15
16 +Alternatively you can use autoconf generated ./configure script to
17 +set up install paths (via config.mak.autogen), so you can write instead
18 +
19 + $ autoconf ;# as yourself if ./configure doesn't exist yet
20 + $ ./configure --prefix=/usr ;# as yourself
21 + $ make all doc ;# as yourself
22 + # make install install-doc ;# as root
23 +
24 +
25 Issues of note:
26
27 - git normally installs a helper script wrapper called "git", which
Makefile
+1
@@ -333,6 +333,7 @@ ifneq (,$(findstring arm,$(uname_M)))
333 ARM_SHA1 = YesPlease
334 endif
335
336 +-include config.mak.autogen
337 -include config.mak
338
339 ifdef WITH_OWN_SUBPROCESS_PY
config.mak.in new
+18
@@ -0,0 +1,18 @@
1 +# git Makefile configuration, included in main Makefile
2 +# @configure_input@
3 +
4 +prefix = @prefix@
5 +exec_prefix = @exec_prefix@
6 +bindir = @bindir@
7 +#gitexecdir = @libexecdir@/git-core/
8 +template_dir = @datadir@/git-core/templates/
9 +GIT_PYTHON_DIR = @datadir@/git-core/python
10 +
11 +mandir=@mandir@
12 +
13 +srcdir = @srcdir@
14 +VPATH = @srcdir@
15 +
16 +export exec_prefix mandir
17 +export srcdir VPATH
18 +
configure.ac new
+14
@@ -0,0 +1,14 @@
1 +# -*- Autoconf -*-
2 +# Process this file with autoconf to produce a configure script.
3 +
4 +AC_PREREQ(2.59)
5 +AC_INIT([git], [1.4.1], [git@vger.kernel.org])
6 +
7 +AC_CONFIG_SRCDIR([git.c])
8 +
9 +config_file=config.mak.autogen
10 +config_in=config.mak.in
11 +
12 +# Output files
13 +AC_CONFIG_FILES(["${config_file}":"${config_in}"])
14 +AC_OUTPUT