Subject: Re: documentation for in-tree autoconf & wrapper
To: None <blair.sadewitz@gmail.com>
From: Masao Uebayashi <uebayasi@brains.co.jp>
List: current-users
Date: 01/11/2007 10:31:23
> - Dig sets of (directory + BSD makefile) for each Makefile.nb; e.g.,
>   if a Makefile.nb defines two programs, foo and bar:
> 
> 	${ORIGDIR}/.../Makefile.nb
> 
> 	${ROVRDIR}/.../Makefile		<- SUBDIR=	foo bar

This is missed.

	${ROVRDIR}/.../Makefile.inc	<- .include "${ORIGDIR}/.../Makefile.nb

> 	${ROVRDIR}/.../foo/
> 	${ROVRDIR}/.../foo/Makefile	<- PROG=	foo
> 	${ROVRDIR}/.../bar/
> 	${ROVRDIR}/.../bar/Makefile	<- PROG=	bar

${ORIGDIR} is like src/gnu/dist/dovecot or xsrc/ or wherever original
source code exists.  ${ROVRDIR} is reach-over directory, like
src/gnu/usr.sbin/dovecot or src/x11/ or ...

Makefile.nb is "trimmed" Makefile.nb which has definitions like

	sbin_PROGRAMS = dovecot
	:
	dovecot_SOURCES = \
		auth-process.c \
		askpass.c \
		dict-process.c \
		log.c \
		login-process.c \
		mail-process.c \
		main.c \
		master-settings.c \
		syslog-util.c \
		ssl-init.c

So if you write BSD makefile like:

	PROG=	dovecot
	SRCS=	${PROG}_SOURCES

Masao