Re: Using GNU Make

2009-04-07 Thread Ralf Wildenhues
* Reuben Thomas wrote on Mon, Apr 06, 2009 at 10:38:55PM CEST:
 On Mon, 6 Apr 2009, Ralf Wildenhues wrote:

 What do you mean by allow it to be required.  You can require it now
 for your package using autotools.

 Right, and my original question was to ask how do I require GNU Make in 
 an autotoolised package? I'm still don't see an official answer to 
 that question, only an autoconf archive macro.

Oh, you expect an official answer or an official macro?  Well, if you
provide a patch for a macro, and it is useful and there is sufficient
need, then I guess it can be accepted into Autoconf.  I don't see how
this is very pressing though, a macro in the Autoconf Macro Archive or
gnulib can be just as fine.  In fact, gnulib already has a gnu-make
module that adds a conditional which you can use to add GNU
make-specific code.

 But POSIX.1.2001 doesn't specify wildcards for `make', either.

 Sure. But in the same way as new projects might reasonably assume a newer 
 version of POSIX than GNU Zile, unless there is POSIX standardisation of  
 newer make features, it will soon be desirable to use newer make 
 features. If one can't do that, what is the point of the extra GNU and 
 BSD make features?

Sure.  I don't argue you shouldn't use them.  Use them all you like.
It's just that I don't think automake should learn any major chunk of
GNU make syntax.  That feels wrong, and also I'm too lazy to do the
work.  But whereever GNU make syntax doesn't interfere with automake
syntax or semantics, by all means use it.  I also think that automake
should not be trying to prevent use of advanced features, after all
that's what -Wno-portability was added for.

Cheers,
Ralf




Re: Using GNU Make

2009-04-07 Thread Mike Frysinger
On Tuesday 07 April 2009 18:40:31 Reuben Thomas wrote:
 On Tue, 7 Apr 2009, Ralf Wildenhues wrote:
 indeed, part of any other widely used package, and with the following:
  In fact, gnulib already has a gnu-make module that adds a conditional
  which you can use to add GNU make-specific code.

 I now have two answers: a macro in gnulib and a macro in autoconf-archive.
 Probably worth working out if the one in autoconf-archive is now redundant.

autoconf-archive is designed to let people pick and choose files manually.  
gnulib doesnt really meld well without using gnulib-tool ...
-mike


signature.asc
Description: This is a digitally signed message part.


Re: Using GNU Make

2009-04-07 Thread Reuben Thomas

On Tue, 7 Apr 2009, Mike Frysinger wrote:


On Tuesday 07 April 2009 18:40:31 Reuben Thomas wrote:

On Tue, 7 Apr 2009, Ralf Wildenhues wrote:
indeed, part of any other widely used package, and with the following:

In fact, gnulib already has a gnu-make module that adds a conditional
which you can use to add GNU make-specific code.


I now have two answers: a macro in gnulib and a macro in autoconf-archive.
Probably worth working out if the one in autoconf-archive is now redundant.


autoconf-archive is designed to let people pick and choose files manually.
gnulib doesnt really meld well without using gnulib-tool ...


I came to this conclusion, but I suggested to the autoconf-archive 
maintainer that he point to the gnulib module for gnulib users (the other 
way around seems to make less sense, as if you're already using gnulib, you 
won't want to pull in an autoconf-archive macro if you can avoid it).


--
http://rrt.sc3d.org/ | Analogy midwives, identity murders




Re: Using GNU Make

2009-04-06 Thread Ralf Wildenhues
Hello Reuben,

* Reuben Thomas wrote on Sat, Apr 04, 2009 at 09:15:43PM CEST:
 On Sat, 4 Apr 2009, Mike Frysinger wrote:

 what would be cool is if automake processed some GNU makeisms in the .am -
 .in step.  personally, i use some things like $(wildcard) and $(patsubst)
 because i hate having to hand maintain a huge list of files -- i inevitably
 add more and forget to update the Makefile.am list.

There is a FAQ entry about wildcards in the Automake manual.

 for projects that need to
 be portable, i put a hack into autogen.sh which builds the list with a shell
 script and then sed's it into Makefile.am while for projects that do not need
 to be portable, i change the automake warning level.

Sounds ok to me.

 Given the portability of GNU Make itself and the number of systems that 
 ship it even if it's not the default make, the day cannot be too far off 
 when it makes sense to promote its use in autotools, in the sense of not 
 merely allowing it but allowing it to be required, in the sort of manner 
 I suggested.

What do you mean by allow it to be required.  You can require it now
for your package using autotools.  Well, if your package is an official
GNU one, then I'm not so sure.

Letting Automake outright require GNU make has two major drawbacks:

1) It causes BSD make to be a second-class citizen.  There are already a
few (rather minor) things which work better with GNU make than with BSD
make, but I'd like to avoid adding any more of this than necessary, and
we try to fix those issues that can be fixed.  That's because BSD makes
are actively developed and used; and given that they have some features
which GNU make doesn't, and for political reasons, there is little
chance that both sets of systems will unify on one of the make tools.

2) If full GNU make syntax is officially deemed ok by Automake, then to
me, it would be a bug if automake doesn't understand that full syntax.
Alas, that is probably never going to happen, this would be a lot of
work, with somewhat dubious benefit, to reimplement GNU make parsing in
Automake.

Also, of course packages like GNU make itself and anything needed to
build it, should not rely on GNU make.  (This is pretty trivially
enforced, GNU make has a build script that requires the system shell
only IIRC.)

 There are a number of times where I've had to work around 
 the lack of GNU make features which are over 10 years old, which seems  
 increasingly silly. For my present project, GNU Zile, which strives to be 
 buildable on any system that conforms with 1993 POSIX, this is fair 
 enough, but increasingly new projects will quite reasonably be assuming  
 POSIX.1-2001, if nothing else because free documentation is widely 
 available for it, unlike the 1993 version.

But POSIX.1.2001 doesn't specify wildcards for `make', either.

Cheers,
Ralf




Re: Using GNU Make

2009-04-06 Thread Reuben Thomas

On Mon, 6 Apr 2009, Ralf Wildenhues wrote:


What do you mean by allow it to be required.  You can require it now
for your package using autotools.


Right, and my original question was to ask how do I require GNU Make in an 
autotoolised package? I'm still don't see an official answer to that 
question, only an autoconf archive macro.



Well, if your package is an official GNU one, then I'm not so sure.


Indeed, that's a different matter.


There are a number of times where I've had to work around
the lack of GNU make features which are over 10 years old, which seems
increasingly silly. For my present project, GNU Zile, which strives to be
buildable on any system that conforms with 1993 POSIX, this is fair
enough, but increasingly new projects will quite reasonably be assuming
POSIX.1-2001, if nothing else because free documentation is widely
available for it, unlike the 1993 version.


But POSIX.1.2001 doesn't specify wildcards for `make', either.


Sure. But in the same way as new projects might reasonably assume a newer 
version of POSIX than GNU Zile, unless there is POSIX standardisation of 
newer make features, it will soon be desirable to use newer make features. 
If one can't do that, what is the point of the extra GNU and BSD make 
features?


--
http://rrt.sc3d.org/ | sane, a.  not unnerved by children




Re: Using GNU Make

2009-04-06 Thread Mike Frysinger
On Monday 06 April 2009 16:32:35 Ralf Wildenhues wrote:
 * Reuben Thomas wrote on Sat, Apr 04, 2009 at 09:15:43PM CEST:
  On Sat, 4 Apr 2009, Mike Frysinger wrote:
  what would be cool is if automake processed some GNU makeisms in the .am
  - .in step.  personally, i use some things like $(wildcard) and
  $(patsubst) because i hate having to hand maintain a huge list of files
  -- i inevitably add more and forget to update the Makefile.am list.

 There is a FAQ entry about wildcards in the Automake manual.

indeed, and i know ive read that before ;).  i understand the philosophical 
arguments and basic pros/cons, but in my case, i dont really worry about any 
of the cons in the stated arguments.

  for projects that need to
  be portable, i put a hack into autogen.sh which builds the list with a
  shell script and then sed's it into Makefile.am while for projects that
  do not need to be portable, i change the automake warning level.

 Sounds ok to me.

it's a pita, but it works
-mike




Re: Using GNU Make

2009-04-04 Thread Ralf Wildenhues
Hello Reuben,

* Reuben Thomas wrote on Sat, Apr 04, 2009 at 02:01:15AM CEST:
 Is there a standard way to make an autotoolised build system require GNU  
 Make? I'm getting a bit fed up having to express everything in POSIX make 
 when most systems now seem to have GNU Make, even where it's not 
 installed as the default make.

In addition to Mike's suggestion:

Use some GNU make-specific construct in your Makefile.am over which all
others barf?  Now, barfing nicely might be a bit of a problem.

You could test '$MAKE --help' at configure time, but the problem is, few
users remember to use './configure MAKE=gmake  gmake', most just do
'./configure  gmake'.  You would teach them! :-)

Cheers,
Ralf




Re: Using GNU Make

2009-04-04 Thread Reuben Thomas

On Fri, 3 Apr 2009, Mike Frysinger wrote:


On Friday 03 April 2009 20:01:15 Reuben Thomas wrote:

Is there a standard way to make an autotoolised build system require GNU
Make? I'm getting a bit fed up having to express everything in POSIX make
when most systems now seem to have GNU Make, even where it's not installed
as the default make.


you dont want warnings or you want automake to generate code specific to GNU
make ?  the former is `automake --warnings=no-portability`.


The former, but also I want the configure script to try to find GNU Make and 
complain if it can't. That's what I meant about a way to require GNU Make.


--
http://rrt.sc3d.org/ | sane, a.  not unnerved by children




Re: Using GNU Make

2009-04-04 Thread Reuben Thomas

On Sat, 4 Apr 2009, Ralf Wildenhues wrote:


You could test '$MAKE --help' at configure time, but the problem is, few
users remember to use './configure MAKE=gmake  gmake', most just do
'./configure  gmake'.  You would teach them! :-)


Ah, so there's no test that does this already?

I would imagine an AC_MAKE_GNU (or somesuch) that looks at make's help 
output, then tries gmake (and gnumake?) if make is not GNU Make.


Oh, and I've just found check_gnu_make.m4 in autoconf-archive.

That looks like what I want.

--
http://rrt.sc3d.org/ | golf, n.  a good walk spoiled (Twain)




Re: Using GNU Make

2009-04-04 Thread Ralf Wildenhues
* Reuben Thomas wrote on Sat, Apr 04, 2009 at 01:44:48PM CEST:
 I would imagine an AC_MAKE_GNU (or somesuch) that looks at make's help  
 output, then tries gmake (and gnumake?) if make is not GNU Make.

 Oh, and I've just found check_gnu_make.m4 in autoconf-archive.

Ah, I didn't know this macro before.

You'd still have to convince the user to actually use the GNU make that
was found though.

Thanks,
Ralf




Re: Using GNU Make

2009-04-04 Thread Reuben Thomas

On Sat, 4 Apr 2009, Ralf Wildenhues wrote:


* Reuben Thomas wrote on Sat, Apr 04, 2009 at 01:44:48PM CEST:

I would imagine an AC_MAKE_GNU (or somesuch) that looks at make's help
output, then tries gmake (and gnumake?) if make is not GNU Make.

Oh, and I've just found check_gnu_make.m4 in autoconf-archive.


Ah, I didn't know this macro before.

You'd still have to convince the user to actually use the GNU make that
was found though.


Yes, I hadn't thought that of course make is the one command that one 
actually types that is not under the control of configure. Drat.


--
http://rrt.sc3d.org/ | priest, n.  an unpaid lawyer (q.v.)




Re: Using GNU Make

2009-04-04 Thread Mike Frysinger
On Saturday 04 April 2009 12:35:08 Reuben Thomas wrote:
 On Sat, 4 Apr 2009, Ralf Wildenhues wrote:
  * Reuben Thomas wrote on Sat, Apr 04, 2009 at 01:44:48PM CEST:
  I would imagine an AC_MAKE_GNU (or somesuch) that looks at make's help
  output, then tries gmake (and gnumake?) if make is not GNU Make.
 
  Oh, and I've just found check_gnu_make.m4 in autoconf-archive.
 
  Ah, I didn't know this macro before.
 
  You'd still have to convince the user to actually use the GNU make that
  was found though.

 Yes, I hadn't thought that of course make is the one command that one
 actually types that is not under the control of configure. Drat.

maybe use GNUmakefile.am rather than Makefile.am ?  and then keep a dummy 
Makefile around that merely says hey sucka, GNU-make only! and/or just re-
run the specified command as gmake ...
-mike


signature.asc
Description: This is a digitally signed message part.


Re: Using GNU Make

2009-04-04 Thread Reuben Thomas

On Sat, 4 Apr 2009, Mike Frysinger wrote:


maybe use GNUmakefile.am rather than Makefile.am ?  and then keep a dummy
Makefile around that merely says hey sucka, GNU-make only! and/or just re-
run the specified command as gmake ...


Thanks. I've actually for one reason and another managed to avoid needing 
GNUisms in my makefiles, though I asked this question originally when I 
thought I was about to need one. It can only be a matter of time, and I'll 
have these useful hints to refer to when that time comes!


--
http://rrt.sc3d.org/ | frog, n.  a prince waiting for the right kiss




Re: Using GNU Make

2009-04-04 Thread Mike Frysinger
On Saturday 04 April 2009 14:55:01 Reuben Thomas wrote:
 On Sat, 4 Apr 2009, Mike Frysinger wrote:
  maybe use GNUmakefile.am rather than Makefile.am ?  and then keep a dummy
  Makefile around that merely says hey sucka, GNU-make only! and/or just
  re- run the specified command as gmake ...

 Thanks. I've actually for one reason and another managed to avoid needing
 GNUisms in my makefiles, though I asked this question originally when I
 thought I was about to need one. It can only be a matter of time, and I'll
 have these useful hints to refer to when that time comes!

what would be cool is if automake processed some GNU makeisms in the .am - 
.in step.  personally, i use some things like $(wildcard) and $(patsubst) 
because i hate having to hand maintain a huge list of files -- i inevitably 
add more and forget to update the Makefile.am list.  for projects that need to 
be portable, i put a hack into autogen.sh which builds the list with a shell 
script and then sed's it into Makefile.am while for projects that do not need 
to be portable, i change the automake warning level.
-mike


signature.asc
Description: This is a digitally signed message part.


Re: Using GNU Make

2009-04-04 Thread Reuben Thomas

On Sat, 4 Apr 2009, Mike Frysinger wrote:


what would be cool is if automake processed some GNU makeisms in the .am -
.in step.  personally, i use some things like $(wildcard) and $(patsubst)
because i hate having to hand maintain a huge list of files -- i inevitably
add more and forget to update the Makefile.am list.  for projects that need to
be portable, i put a hack into autogen.sh which builds the list with a shell
script and then sed's it into Makefile.am while for projects that do not need
to be portable, i change the automake warning level.


Given the portability of GNU Make itself and the number of systems that ship 
it even if it's not the default make, the day cannot be too far off when it 
makes sense to promote its use in autotools, in the sense of not merely 
allowing it but allowing it to be required, in the sort of manner I 
suggested. There are a number of times where I've had to work around the 
lack of GNU make features which are over 10 years old, which seems 
increasingly silly. For my present project, GNU Zile, which strives to be 
buildable on any system that conforms with 1993 POSIX, this is fair enough, 
but increasingly new projects will quite reasonably be assuming 
POSIX.1-2001, if nothing else because free documentation is widely available 
for it, unlike the 1993 version.


--
http://rrt.sc3d.org/ | Brevity is the soul




Using GNU Make

2009-04-03 Thread Reuben Thomas
Is there a standard way to make an autotoolised build system require GNU 
Make? I'm getting a bit fed up having to express everything in POSIX make 
when most systems now seem to have GNU Make, even where it's not installed 
as the default make.


--
http://rrt.sc3d.org/ | fiction, n.  fact without citations




Re: Using GNU Make

2009-04-03 Thread Mike Frysinger
On Friday 03 April 2009 20:01:15 Reuben Thomas wrote:
 Is there a standard way to make an autotoolised build system require GNU
 Make? I'm getting a bit fed up having to express everything in POSIX make
 when most systems now seem to have GNU Make, even where it's not installed
 as the default make.

you dont want warnings or you want automake to generate code specific to GNU 
make ?  the former is `automake --warnings=no-portability`.
-mike