git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Han-Wen Nienhuys <hanwen@xs4all.nl>
Cc: git@vger.kernel.org
Subject: Re: bug: git-sh-setup should not be in $PATH
Date: Wed, 6 Dec 2006 15:51:51 +0100	[thread overview]
Message-ID: <200612061551.51603.jnareb@gmail.com> (raw)
In-Reply-To: <4576D0CB.7090408@xs4all.nl>

Han-Wen Nienhuys wrote::
> Jakub Narebski escreveu:
>> Han-Wen Nienhuys wrote:
>> 
>>> Subject: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path.
>> 
>> I like it... but could you check if you don't need to change
>> config.mak.in accordingly for ./configure script to generate proper
>> config.mak.autogen?
> 
> I couldn't see anything, but while I was looking at it, I also added
> support for non-srcdir builds.

[...]
> From 7bbd698891d9102fa26ae53848c9812f6d1b665e Mon Sep 17 00:00:00 2001
> From: Han-Wen Nienhuys <hanwen@lilypond.org>
> Date: Wed, 6 Dec 2006 15:14:08 +0100
> Subject: [PATCH] Allow non-srcdir builds using cd $builddir && $srcdir/configure

Please add some longer commit message.

> Signed-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl>
> ---
>  Makefile            |   19 +++++++++++--------
>  config.mak.in       |    5 +----
>  configure.ac        |   31 ++++++++++++++++++++++++++++++-
>  generate-cmdlist.sh |    2 +-
>  perl/Makefile       |    2 +-
>  5 files changed, 44 insertions(+), 15 deletions(-)
[...]
> diff --git a/config.mak.in b/config.mak.in
> index 9a57840..902a392 100644
> --- a/config.mak.in
> +++ b/config.mak.in
[...]
> @@ -10,9 +10,6 @@ TAR = @TAR@
>  prefix = @prefix@
>  exec_prefix = @exec_prefix@
>  bindir = @bindir@
> -#gitexecdir = @libexecdir@/git-core/
> -datarootdir = @datarootdir@
> -template_dir = @datadir@/git-core/templates/
>  
>  mandir=@mandir@

Why have you removed setting datarootdir and template_dir? I would
have thought that you would rather change it to

  #gitexecdir = @libexecdir@/git-core/
  datarootdir = @datarootdir@
  GIT_datadir = @datadir@/git-core/
  template_dir= @datadir@/git-core/templates/
  
in config.mak.in

I have been told that setting 'datarootdir' is required to avoid
warnings with new versions of autoconf.

> diff --git a/configure.ac b/configure.ac
> index 34e3478..ccf9374 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -5,11 +5,13 @@ AC_PREREQ(2.59)
>  AC_INIT([git], [@@GIT_VERSION@@], [git@vger.kernel.org])
>  
>  AC_CONFIG_SRCDIR([git.c])
> -
> +srcdir=`cd $srcdir && pwd`
>  config_file=config.mak.autogen
>  config_append=config.mak.append

AC_CONFIG_SRCDIR should set 'srcdir' correctly.

> @@ -330,10 +332,37 @@ GIT_PARSE_WITH(iconv))
[...]
> +## generate subdirectories and sub Makefiles. 
> +for d in `cd $srcdir &&  find . -type d -print | grep -v '\.git'` ;
> +do
> +  if test ! -d  $d ; then
> +    echo creating $d 
> +    mkdir $d
> +  fi
> +  
> +  if test -f $srcdir/$d/Makefile ; then
> +    
> +    dnl [[]] is to keep m4 happy
> +    depth=`echo $d/ | sed -e 's!^\./!!g' -e 's![[^/]]*/!../!g'`
> +    echo creating $d/Makefile
> +    cat << EOF > $d/Makefile
> +include ${depth}config.mak.autogen
> +here-srcdir=\$(srcdir)/$d/
> +VPATH=\$(here-srcdir)
> +include \$(here-srcdir)/Makefile
> +EOF
> +
> +  fi 
> +done
> +exit 1

What is this for? The ./configure script, generated by autoconf from
configure.ac (by "make configure"), generates config.mak.autogen file
from config.mak.in, which is included in main (top) Makefile.

The variables defined in config.mak.autogen are of course visible in
make in subdirectories (make invoked from main makefile). Why the change?
What about user-generated config.mak?

This part IMHO has no sense, and has no place here.
-- 
Jakub Narebski

  reply	other threads:[~2006-12-06 14:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06 12:14 bug: git-sh-setup should not be in $PATH Han-Wen Nienhuys
2006-12-06 12:23 ` Johannes Schindelin
2006-12-06 12:34   ` Han-Wen Nienhuys
2006-12-06 12:56     ` Jakub Narebski
2006-12-06 14:16       ` Han-Wen Nienhuys
2006-12-06 14:51         ` Jakub Narebski [this message]
2006-12-06 15:03           ` Han-Wen Nienhuys
2006-12-06 15:27             ` Jakub Narebski
2006-12-06 15:36               ` Han-Wen Nienhuys
2006-12-06 15:56                 ` Jakub Narebski
2006-12-06 16:03                   ` Han-Wen Nienhuys
2006-12-06 16:27                     ` Jakub Narebski
2006-12-06 16:40                       ` Han-Wen Nienhuys
2006-12-06 16:52                         ` Jakub Narebski
2006-12-06 16:56                           ` Han-Wen Nienhuys
2006-12-06 17:11                             ` Jakub Narebski
2006-12-07 13:36                     ` Andreas Ericsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200612061551.51603.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=hanwen@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).