need help with vbox

Ivan Voras ivoras at freebsd.org
Thu Oct 16 15:11:41 UTC 2008


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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20081016/2f4b2f07/signature.pgp


More information about the freebsd-hackers mailing list