Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Oct 2008 17:11:06 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: need help with vbox
Message-ID:  <gd7liq$42l$1@ger.gmane.org>
In-Reply-To: <BLU126-W35B1C6E35288446D2348D2ED330@phx.gbl>
References:  <BLU126-W3895D1CBA824D05E30D5A2ED330@phx.gbl>	<gd70g0$kge$1@ger.gmane.org>	<48F70904.8000702@cran.org.uk> <gd71nn$mnr$1@ger.gmane.org> <BLU126-W35B1C6E35288446D2348D2ED330@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig65A92686CEEA2C5401BABFD1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Desmond Chapman wrote:
> Gentleman, I agree with both of you.
> Thanks for everything.

Sorry if it seemed terse - I wasn't trying to discourage you.
Translating from one Makefile type into another is similar to
translating from one programming language to another - you need someone
who knows both languages very well. I don't know how many people know
both kmk and FreeBSD make well enough to help you (for that matter, both
systems have people dedicated to makefiles since they can be very
complex, so the majority of developers don't know the full magic behind
the makefiles).

Since you probably can't use much of the Linux source for your FreeBSD
kernel module (you'll probably have to do most of it from scratch),
you'd do much better to abandon kmk and write your FreeBSD makefiles
with FreeBSD make. You'll have to write new makefiles anyway.

On the other hand (I'm not a makefile expert), browsing through
http://svn.netlabs.org/kbuild/wiki/kmk it looks like most "new" features
are present in FreeBSD's make, though in a different form (and were
probably implemented ages ago so they just went ahead and reinvented the
wheel again). For example:

# Explicit multi-target rules, i.e. explicit make rules that output more
than one file.

make(1): "Dependency lines consist of one or more targets, an operator...=
 "

# Prepend assignment operator

I think you can do this with regular variable expansion.

# The special .NOTPARALLEL goal has been extended...

The .NOTPARALLEL goal exists, but it looks like it's not "extended".
Anyway it doesn't matter.

# It has some extra predefined variables:

You'll have to simulate those with regular variables.

# It has a few new builtin functions...

FreeBSD's make doesn't have many builtin functions but arithmetic
operations work by default (".if $a < 10"). There are no binary
operators. Some string functions are present as operators (like "O -
Order every word in the variable alphabetically"). You can simulate many
functions and operators by invoking shell scripts.

# A bunch of builtin utilities which will be invoked without spawning
new process or shell. Most of these are taken from BSD.  (cp, echo, cat,
append...)

Though it says they came from BSD, I can't find anything about builtin
utilities in make(1). Just use regular shell utilities.



--------------enig65A92686CEEA2C5401BABFD1
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkj3WY8ACgkQldnAQVacBciHJgCeMOoE3sZvwSLmb4eQ+Q6ffN42
i5sAn3m+nKYNGHaWhaaWOgO/ioc6a5+4
=QxY2
-----END PGP SIGNATURE-----

--------------enig65A92686CEEA2C5401BABFD1--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?gd7liq$42l$1>