lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cleanup initialization of configure process (issue 549350043 by addr


From: dak
Subject: Re: Cleanup initialization of configure process (issue 549350043 by address@hidden)
Date: Tue, 14 Jan 2020 07:54:28 -0800

On 2020/01/14 15:19:09, dak wrote:
On 2020/01/14 15:07:48, dak wrote:
> On 2020/01/14 14:48:44, Dan Eble wrote:
> > On 2020/01/14 14:43:34, hahnjo wrote:
> > > On 2020/01/14 14:29:38, Dan Eble wrote:
> > > > On 2020/01/14 13:59:43, dak wrote:
> > > > > On 2020/01/14 13:52:02, hahnjo wrote:
> > > > > I am not overly happy that it makes for inoperative code in
the case
of
> a
> > > > > read-only repository that autogen.sh tries catering for.
> > > >
> > > > Thank you for calling this out, for I was not paying
attention.  I am
> > > currently
> > > > using a read-only view of the source directory in my build
environment.
> > > >
> > > > Please do not push this change yet.  I will review it shortly
and offer
an
> > > > opinion.
> > >
> > > Sure, I'm not in a hurry to land this.
> > > Could you maybe share how your build environment looks like to
use a
> read-only
> > > view of the git repository?
> >
> > I build in a Docker container.  ~/lilypond-src is a read-only view
of the
git
> > source tree.  ~/lilypond-build is the build directory.  This is
how I begin:
> >
> >     cd ~/lilypond-build
> >     ~/lilypond-src/autogen.sh
>
> I should have checked the "git blame" output.
>
> commit edb80ace4df074fcb8a4976f452aabd2238cf733
> Author: Dan Eble <mailto:address@hidden>
> Date:   Sat Jan 27 13:04:49 2018 -0500
>
>     Issue 5268: simplify building with a read-only source directory
>
>     autogen.sh: If the source directory is not writable, generate
the
>     configure script into the current directory and tell the
configure
>     script the source directory.
>
>     This is convenient for those would prefer to build in a
container or
>     virtual machine with a read-only view of source stored on the
host.

Well, the easiest expedience would be putting (on the assumption that
we don't
have to deal with Windows file systems or similar)

ln -sf $srcdir/VERSION .

before the autoconf call.  Making a copy instead of a symbolic link is
also
conceivable but may be more likely to cause problems.  Or one figures
out a
proper solution.  Let me see.

Well, how about
diff --git a/autogen.sh b/autogen.sh
index 1ca0fc0c0f..c638993f34 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -18,7 +18,7 @@ else
   configure=./configure
   conf_flags="--srcdir $srcdir $conf_flags"
   echo "Running autoconf for read-only source directory ..."
-  autoconf -I "$srcdir" -o "$configure" "$srcdir/configure.ac" || exit
1
+  SRCDIR="$srcdir" autoconf -I "$srcdir" -o "$configure"
"$srcdir/configure.ac" || exit 1
 fi
 # Autoconf automatically checks its own minimum required
 # version, and it aborts when the check fails.
diff --git a/configure.ac b/configure.ac
index bdbc827187..c75e01de9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,9 @@ dnl Process this file with autoconf to produce a
configure script.
 AC_PREREQ(2.60)

 # Bootstrap the init process.
-AC_INIT
+AC_INIT([LilyPond],
+    [m4_esyscmd_s([. ${SRCDIR:-.}/VERSION; echo
$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL])],
+    [address@hidden], [lilypond], [http://lilypond.org/])

 # Bootstrap StepMake configure
 AC_CONFIG_AUX_DIR([config])

That would seem to cater for Dan's use case reasonably well.  Sure,
calling autoconf from outside of autogen.sh for a read-only source
directory...  But at some point of time, people have to deal with the
strange things they do.

https://codereview.appspot.com/549350043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]