views:

25

answers:

2

I was looking through the main makefile in the ports tarball of FreeBSD.

I saw the following include directive:

PORTSTOP=   yes

.include <bsd.port.subdir.mk>

index:
    @rm -f ${INDEXDIR}/${INDEXFILE}
    @cd ${.CURDIR} && make ${INDEXDIR}/${INDEXFILE}

and was wondering why a period was in front of include.

Also, are they using GNU Make in FreeBSD?

+2  A: 

FreeBSD have their own make tool, it's not GNU make. It's posix compliant but have several extensions, and is often just called BSD make. The initial . though is just the way certain constructs of the make commands are made.

Directives, conditionals, and for loops reminiscent of the C programming language are provided in make. All such structures are identified by a line beginning with a single dot (`.') character.

So, it's just a way of distinguising certain constructs from the rest of the make language, not unlike the `#`` in C/C++ used for preprocessor directives.

nos
A: 

FreeBSD uses the BSD version of make which other BSDs use also(sometimes with slight modifications). For instance, OpenBSD and NetBSD are included with BSD make.

The make program is POSIX compliant but of course does not strive to emulate GNU features or be anything alike other than POSIX compliancy

Earlz