@ -179,28 +179,32 @@ STRIP ?= strip
# Among the variables below, these:
# Among the variables below, these:
# gitexecdir
# gitexecdir
# template_dir
# template_dir
# mandir
# infodir
# htmldir
# htmldir
# ETC_GITCONFIG (but not sysconfdir)
# ETC_GITCONFIG (but not sysconfdir)
# can be specified as a relative path ../some/where/else (which must begin
# can be specified as a relative path some/where/else;
# with ../); this is interpreted as relative to $(bindir) and "git" at
# this is interpreted as relative to $(prefix) and "git" at
# runtime figures out where they are based on the path to the executable.
# runtime figures out where they are based on the path to the executable.
# This can help installing the suite in a relocatable way.
# This can help installing the suite in a relocatable way.
prefix = $(HOME)
prefix = $(HOME)
bindir = $(prefix)/bin
bindir_relative = bin
mandir = $(prefix)/share/man
bindir = $(prefix)/$(bindir_relative)
infodir = $(prefix)/share/info
mandir = share/man
gitexecdir = $(prefix)/libexec/git-core
infodir = share/info
gitexecdir = libexec/git-core
sharedir = $(prefix)/share
sharedir = $(prefix)/share
template_dir = $(sharedir)/git-core/templates
template_dir = share/git-core/templates
htmldir=$(sharedir)/doc/git-doc
htmldir = share/doc/git-doc
ifeq ($(prefix),/usr)
ifeq ($(prefix),/usr)
sysconfdir = /etc
sysconfdir = /etc
ETC_GITCONFIG = $(sysconfdir)/gitconfig
else
else
sysconfdir = $(prefix)/etc
sysconfdir = $(prefix)/etc
ETC_GITCONFIG = etc/gitconfig
endif
endif
lib = lib
lib = lib
ETC_GITCONFIG = $(sysconfdir)/gitconfig
# DESTDIR=
# DESTDIR=
# default configuration for gitweb
# default configuration for gitweb
@ -1086,6 +1090,7 @@ ETC_GITCONFIG_SQ = $(subst ','\'',$(ETC_GITCONFIG))
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
bindir_SQ = $(subst ','\'',$(bindir))
bindir_SQ = $(subst ','\'',$(bindir))
bindir_relative_SQ = $(subst ','\'',$(bindir_relative))
mandir_SQ = $(subst ','\'',$(mandir))
mandir_SQ = $(subst ','\'',$(mandir))
infodir_SQ = $(subst ','\'',$(infodir))
infodir_SQ = $(subst ','\'',$(infodir))
gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
@ -1251,7 +1256,12 @@ git.o git.spec \
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
exec_cmd.o: exec_cmd.c GIT-CFLAGS
exec_cmd.o: exec_cmd.c GIT-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' $<
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
'-DBINDIR="$(bindir_relative_SQ)"' \
'-DPREFIX="$(prefix_SQ)"' \
$<
builtin-init-db.o: builtin-init-db.c GIT-CFLAGS
builtin-init-db.o: builtin-init-db.c GIT-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' $<
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' $<
@ -1407,17 +1417,17 @@ remove-dashes:
### Installation rules
### Installation rules
ifeq ($(firstword $(subst /, ,$(template_dir))),..)
ifeq ($(abspath $(template_dir)),$(template_dir))
template_instdir = $(bindir)/$(template_dir)
else
template_instdir = $(template_dir)
template_instdir = $(template_dir)
else
template_instdir = $(prefix)/$(template_dir)
endif
endif
export template_instdir
export template_instdir
ifeq ($(firstword $(subst /, ,$(gitexecdir))),..)
ifeq ($(abspath $(gitexecdir)),$(gitexecdir))
gitexec_instdir = $(bindir)/$(gitexecdir)
else
gitexec_instdir = $(gitexecdir)
gitexec_instdir = $(gitexecdir)
else
gitexec_instdir = $(prefix)/$(gitexecdir)
endif
endif
gitexec_instdir_SQ = $(subst ','\'',$(gitexec_instdir))
gitexec_instdir_SQ = $(subst ','\'',$(gitexec_instdir))
export gitexec_instdir
export gitexec_instdir