Skip to content

Commit

Permalink
autoconf: Use autoconf to write installation directories to config.ma…
Browse files Browse the repository at this point in the history
…k.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>
  • Loading branch information
jnareb authored and Junio C Hamano committed Jul 3, 2006
1 parent 7b8cf0c commit 5566771
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -135,4 +135,10 @@ git-core.spec
*.[ao] *.[ao]
*.py[co] *.py[co]
config.mak config.mak
autom4te.cache
config.log
config.status
config.mak.in
config.mak.autogen
configure
git-blame git-blame
9 changes: 9 additions & 0 deletions INSTALL
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ that uses $prefix, the built results have some paths encoded,
which are derived from $prefix, so "make all; make prefix=/usr which are derived from $prefix, so "make all; make prefix=/usr
install" would not work. install" would not work.


Alternatively you can use autoconf generated ./configure script to
set up install paths (via config.mak.autogen), so you can write instead

$ autoconf ;# as yourself if ./configure doesn't exist yet
$ ./configure --prefix=/usr ;# as yourself
$ make all doc ;# as yourself
# make install install-doc ;# as root


Issues of note: Issues of note:


- git normally installs a helper script wrapper called "git", which - git normally installs a helper script wrapper called "git", which
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ ifneq (,$(findstring arm,$(uname_M)))
ARM_SHA1 = YesPlease ARM_SHA1 = YesPlease
endif endif


-include config.mak.autogen
-include config.mak -include config.mak


ifdef WITH_OWN_SUBPROCESS_PY ifdef WITH_OWN_SUBPROCESS_PY
Expand Down
18 changes: 18 additions & 0 deletions config.mak.in
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,18 @@
# git Makefile configuration, included in main Makefile
# @configure_input@

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
#gitexecdir = @libexecdir@/git-core/
template_dir = @datadir@/git-core/templates/
GIT_PYTHON_DIR = @datadir@/git-core/python

mandir=@mandir@

srcdir = @srcdir@
VPATH = @srcdir@

export exec_prefix mandir
export srcdir VPATH

14 changes: 14 additions & 0 deletions configure.ac
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT([git], [1.4.1], [git@vger.kernel.org])

AC_CONFIG_SRCDIR([git.c])

config_file=config.mak.autogen
config_in=config.mak.in

# Output files
AC_CONFIG_FILES(["${config_file}":"${config_in}"])
AC_OUTPUT

0 comments on commit 5566771

Please sign in to comment.