Nmap Development mailing list archives

Re: [PATCH] Re: 4.90RC1 doesn't compile on FreeBSD


From: David Fifield <david () bamsoftware com>
Date: Thu, 2 Jul 2009 12:24:13 -0600

On Thu, Jul 02, 2009 at 07:23:01PM +0200, Daniel Roethlisberger wrote:
David Fifield <david () bamsoftware com> 2009-07-01:
On Mon, Jun 29, 2009 at 05:09:49PM -0500, Kris Katterjohn wrote:
Daniel Roethlisberger wrote:
Fyodor <fyodor () insecure org> 2009-06-29:
On Sat, Jun 27, 2009 at 02:59:17PM +0200, Daniel Roethlisberger wrote:
Fyodor <fyodor () insecure org> 2009-06-26:

Patch attached.  With gmake installed, invoking `make` will
automatically invoke `gmake` on the same target(s).  Without
gmake installed, you get this:
Thanks, this looks good.  Do you know if the make on FreeBSD, Solaris,
OpenBSD, and NetBSD all accept this 'BSDmakefile' name and give it
precedence over "Makefile"?

FreeBSD and OpenBSD both have a make(1) which uses "BSDmakefile"
in precedence of "makefile" and "Makefile".  NetBSD and Solaris
don't.

I don't think it is feasible to write a Makefile compatible with
all implementations of make(1), but maybe that's being too
pessimistic.

GNU make checks for GNUmakefile before anything else, just like the BSD make
in FreeBSD and OpenBSD apparently checks for BSDmakefile first.

So:

1) Move our current Makefile to GNUmakefile
2) Create a new Makefile/makefile which simply calls gmake on the GNUmakefile

I like this idea. We just move Makefile.in to GNUmakefile.in and then
AC_OUTPUT(GNUmakefile) in configure.ac. Then move the current
BSDmakefile to Makefile. Can anyone think of a portability problem with
this?

The BSDmakefile I provided is only tested with BSD make.  The
only potential portability issue is probably the use of
$(.TARGETS) in order to call gmake on the same target list as
make was invoked with.  Not sure how portable that is.  We might
have to explicitly include all targets we expect to be invoked,
such as "clean", otherwise running `make clean` results in
`gmake` being run on the default target.

That's cool, this way we'll have only a small makefile to keep portable,
not a large one. And it's easy to add in a few specific targets if we
need them, right?

The oldest version of GNU Make at ftp.gnu.org, 3.75 from 1996, supports
GNUmakefile so there's no problem there.

Kris or Daniel, you can go ahead and make this change.

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: