[notmuch] [PATCH 1/3] fix configure script to handle --prefix= and properly create Makefile.config

2009-12-05 Thread Carl Worth
On Sat, 05 Dec 2009 09:59:12 +0100, Ingmar Vanhassel  
wrote:
> Excerpts from Carl Worth's message of Sat Dec 05 01:56:56 +0100 2009:
> > Cool. At least not everyone thinks I'm crazy then. That's
> > encouraging. :-)
> 
> I'm not convinced that re-implementing lots of things that autoconf
> already handles properly & portably is the better route to go. It's
> purely a waste of time. Hence, I'll be happy to send patches to use
> autoconf, if you change your mind on the subject.

Let's test it.

If you could write a patch to replace our current configure script with
something based on autoconf, then I'll be glad to try it out and see
what I think.

If there are any differences that I find annoying, then we can see which
of those we can work around or get fixed in upstream autoconf.

I'm definitely open to exploration in this area.

> Now when you say you hate automake & libtool, then I'll wholeheartedly
> agree with you.

Hate is one emotion that I do my best to avoid. But I am quite glad to
have found no compelling reason to use either automake or libtool so
far in notmuch. :-)

-Carl
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



[notmuch] [PATCH 1/3] fix configure script to handle --prefix= and properly create Makefile.config

2009-12-05 Thread Ingmar Vanhassel
Excerpts from Carl Worth's message of Sat Dec 05 01:56:56 +0100 2009:
> Cool. At least not everyone thinks I'm crazy then. That's
> encouraging. :-)

I'm not convinced that re-implementing lots of things that autoconf
already handles properly & portably is the better route to go. It's
purely a waste of time. Hence, I'll be happy to send patches to use
autoconf, if you change your mind on the subject.

Now when you say you hate automake & libtool, then I'll wholeheartedly
agree with you.

-Ingmar
-- 
Exherbo KDE, X.org maintainer


Re: [notmuch] [PATCH 1/3] fix configure script to handle --prefix= and properly create Makefile.config

2009-12-05 Thread Ingmar Vanhassel
Excerpts from Carl Worth's message of Sat Dec 05 01:56:56 +0100 2009:
 Cool. At least not everyone thinks I'm crazy then. That's
 encouraging. :-)

I'm not convinced that re-implementing lots of things that autoconf
already handles properly  portably is the better route to go. It's
purely a waste of time. Hence, I'll be happy to send patches to use
autoconf, if you change your mind on the subject.

Now when you say you hate automake  libtool, then I'll wholeheartedly
agree with you.

-Ingmar
-- 
Exherbo KDE, X.org maintainer
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[notmuch] [PATCH 1/3] fix configure script to handle --prefix= and properly create Makefile.config

2009-12-04 Thread Jameson Graef Rollins
On Fri, Dec 04, 2009 at 04:12:47PM -0800, Carl Worth wrote:
> Handling --prefix will be a nice addition to our configure script. So,
> thanks!

Yeah, it's definitely needed for the Debian packaging as well.

> Your commit message has that flag word of "also" in it, and as it turns
> out, the removal of Makefile.config from the repository has actually
> happened already. But that was easy enough to fix.

I was thinking that the removal of the Makefile.config from the repo
went together with the new auto-generation of that file from configure
script.  Do you think they still should have been separate patches?

> > +# option parsing
> > +for option; do
> > +if [ "${option%=*}" = '--prefix' ] ; then
> > +   PREFIX="${option#*=}"
> > +fi
> > +done
> 
> I've gone ahead and committed that now. Then I noticed that we should
> really use ${option%%=*} to support the case of an option value
> containing an '=' character. So I fixed that.

Ah, good catch.  Sorry about that.  

> Our configuration system certainly isn't as full-featured yet as a
> standard autoconf-based configure script, but I'm quite happy with how
> clean it is for both users and developers.

Autoconf terrifies me, so I agree I'm quite happy with the simple
configure script we have right now.  If it gets the job done without
having to deal with autoconf then that's great in my book.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: 



[notmuch] [PATCH 1/3] fix configure script to handle --prefix= and properly create Makefile.config

2009-12-04 Thread Carl Worth
On Fri, 4 Dec 2009 19:20:50 -0500, Jameson Graef Rollins  wrote:
> > Your commit message has that flag word of "also" in it, and as it turns
> > out, the removal of Makefile.config from the repository has actually
> > happened already. But that was easy enough to fix.
> 
> I was thinking that the removal of the Makefile.config from the repo
> went together with the new auto-generation of that file from configure
> script.  Do you think they still should have been separate patches?

No, it was fine. It's just funny to me how often that word "also" in a
commit message seems to end up being a predictor for things later, (like
this case where half of a patch is already implemented, or much worse,
how often a bisect lands on a commit that makes multiple changes).

So I was really just expressing amusement at seeing it again.

> > > +# option parsing
> > > +for option; do
> > > +if [ "${option%=*}" = '--prefix' ] ; then
> > > + PREFIX="${option#*=}"
> > > +fi
> > > +done
> > 
> > I've gone ahead and committed that now. Then I noticed that we should
> > really use ${option%%=*} to support the case of an option value
> > containing an '=' character. So I fixed that.
> 
> Ah, good catch.  Sorry about that.  

No worries. I was just impressed at the tiny amount of code needed for
the parsing here, so ended up looking closer to understand it.

> Autoconf terrifies me, so I agree I'm quite happy with the simple
> configure script we have right now.  If it gets the job done without
> having to deal with autoconf then that's great in my book.

Cool. At least not everyone thinks I'm crazy then. That's
encouraging. :-)

-Carl
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



[notmuch] [PATCH 1/3] fix configure script to handle --prefix= and properly create Makefile.config

2009-12-04 Thread Carl Worth
On Sat, 28 Nov 2009 18:57:35 -0500, Jameson Graef Rollins  wrote:
> This also removes the Makefile.config from the repository, since it
> shouldn't be kept in the repository and should be created by the
> configure script.

Hi Jamie,

Handling --prefix will be a nice addition to our configure script. So,
thanks!

Your commit message has that flag word of "also" in it, and as it turns
out, the removal of Makefile.config from the repository has actually
happened already. But that was easy enough to fix.

> +# option parsing
> +for option; do
> +if [ "${option%=*}" = '--prefix' ] ; then
> + PREFIX="${option#*=}"
> +fi
> +done

I've gone ahead and committed that now. Then I noticed that we should
really use ${option%%=*} to support the case of an option value
containing an '=' character. So I fixed that.

Then, since I was in the area, I added support to configure for
capturing CFLAGS from the environment, I fixed this (and also "make
CFLAGS=") to also influence C++ compilation (still can be separately
overridden with CXXFLAGS), and I fixed our quiet-compilation mode to
actually print the (user-specified) CFLAGS.

Finally, I documented things by adding a "configure --help" to document
CC, CFLAGS, and --prefix; and by making "make" tell the user about
"./configure" and "./configure --help" when make runs configure
implicitly.

Our configuration system certainly isn't as full-featured yet as a
standard autoconf-based configure script, but I'm quite happy with how
clean it is for both users and developers.

-Carl
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



Re: [notmuch] [PATCH 1/3] fix configure script to handle --prefix= and properly create Makefile.config

2009-12-04 Thread Carl Worth
On Sat, 28 Nov 2009 18:57:35 -0500, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
 This also removes the Makefile.config from the repository, since it
 shouldn't be kept in the repository and should be created by the
 configure script.

Hi Jamie,

Handling --prefix will be a nice addition to our configure script. So,
thanks!

Your commit message has that flag word of also in it, and as it turns
out, the removal of Makefile.config from the repository has actually
happened already. But that was easy enough to fix.

 +# option parsing
 +for option; do
 +if [ ${option%=*} = '--prefix' ] ; then
 + PREFIX=${option#*=}
 +fi
 +done

I've gone ahead and committed that now. Then I noticed that we should
really use ${option%%=*} to support the case of an option value
containing an '=' character. So I fixed that.

Then, since I was in the area, I added support to configure for
capturing CFLAGS from the environment, I fixed this (and also make
CFLAGS=) to also influence C++ compilation (still can be separately
overridden with CXXFLAGS), and I fixed our quiet-compilation mode to
actually print the (user-specified) CFLAGS.

Finally, I documented things by adding a configure --help to document
CC, CFLAGS, and --prefix; and by making make tell the user about
./configure and ./configure --help when make runs configure
implicitly.

Our configuration system certainly isn't as full-featured yet as a
standard autoconf-based configure script, but I'm quite happy with how
clean it is for both users and developers.

-Carl


pgp653MkE239C.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [notmuch] [PATCH 1/3] fix configure script to handle --prefix= and properly create Makefile.config

2009-12-04 Thread Jameson Graef Rollins
On Fri, Dec 04, 2009 at 04:12:47PM -0800, Carl Worth wrote:
 Handling --prefix will be a nice addition to our configure script. So,
 thanks!

Yeah, it's definitely needed for the Debian packaging as well.

 Your commit message has that flag word of also in it, and as it turns
 out, the removal of Makefile.config from the repository has actually
 happened already. But that was easy enough to fix.

I was thinking that the removal of the Makefile.config from the repo
went together with the new auto-generation of that file from configure
script.  Do you think they still should have been separate patches?

  +# option parsing
  +for option; do
  +if [ ${option%=*} = '--prefix' ] ; then
  +   PREFIX=${option#*=}
  +fi
  +done
 
 I've gone ahead and committed that now. Then I noticed that we should
 really use ${option%%=*} to support the case of an option value
 containing an '=' character. So I fixed that.

Ah, good catch.  Sorry about that.  

 Our configuration system certainly isn't as full-featured yet as a
 standard autoconf-based configure script, but I'm quite happy with how
 clean it is for both users and developers.

Autoconf terrifies me, so I agree I'm quite happy with the simple
configure script we have right now.  If it gets the job done without
having to deal with autoconf then that's great in my book.

jamie.


signature.asc
Description: Digital signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [notmuch] [PATCH 1/3] fix configure script to handle --prefix= and properly create Makefile.config

2009-12-04 Thread Carl Worth
On Fri, 4 Dec 2009 19:20:50 -0500, Jameson Graef Rollins 
jroll...@finestructure.net wrote:
  Your commit message has that flag word of also in it, and as it turns
  out, the removal of Makefile.config from the repository has actually
  happened already. But that was easy enough to fix.
 
 I was thinking that the removal of the Makefile.config from the repo
 went together with the new auto-generation of that file from configure
 script.  Do you think they still should have been separate patches?

No, it was fine. It's just funny to me how often that word also in a
commit message seems to end up being a predictor for things later, (like
this case where half of a patch is already implemented, or much worse,
how often a bisect lands on a commit that makes multiple changes).

So I was really just expressing amusement at seeing it again.

   +# option parsing
   +for option; do
   +if [ ${option%=*} = '--prefix' ] ; then
   + PREFIX=${option#*=}
   +fi
   +done
  
  I've gone ahead and committed that now. Then I noticed that we should
  really use ${option%%=*} to support the case of an option value
  containing an '=' character. So I fixed that.
 
 Ah, good catch.  Sorry about that.  

No worries. I was just impressed at the tiny amount of code needed for
the parsing here, so ended up looking closer to understand it.

 Autoconf terrifies me, so I agree I'm quite happy with the simple
 configure script we have right now.  If it gets the job done without
 having to deal with autoconf then that's great in my book.

Cool. At least not everyone thinks I'm crazy then. That's
encouraging. :-)

-Carl


pgplDoLzToHyz.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[notmuch] [PATCH 1/3] fix configure script to handle --prefix= and properly create Makefile.config

2009-11-28 Thread Jameson Graef Rollins
This also removes the Makefile.config from the repository, since it
shouldn't be kept in the repository and should be created by the
configure script.
---
 Makefile.config |3 ---
 configure   |   12 +++-
 2 files changed, 11 insertions(+), 4 deletions(-)
 delete mode 100644 Makefile.config

diff --git a/Makefile.config b/Makefile.config
deleted file mode 100644
index ddc7436..000
--- a/Makefile.config
+++ /dev/null
@@ -1,3 +0,0 @@
-prefix = /usr/local
-bash_completion_dir = /etc/bash_completion.d
-CFLAGS += -DHAVE_VALGRIND
diff --git a/configure b/configure
index e55f067..ab28fa3 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,15 @@
 #! /bin/sh

+# defaults
+PREFIX=/usr/local
+
+# option parsing
+for option; do
+if [ "${option%=*}" = '--prefix' ] ; then
+   PREFIX="${option#*=}"
+fi
+done
+
 cat < Makefile.config <