openoffice-1.1 build more broken than usual on 5.2-CURRENT
Bartosz Fabianowski
freebsd at chillt.de
Wed Aug 11 19:25:46 PDT 2004
> [...] When CFLAGS (or any other variable) is specified on the command
> line, this variable assignment is also stashed in the MAKEFLAGS
> environment variable, which gets passed to all the sub makes, [...]
If this is the root of the problem, then there must be some point in the
chain of make invocations where it's called with additional command line
arguments that then get passed on to gmake and screw up the build.
This apparently happens when the main port is trying to build the
mozilla subport. It first spawns a make to build the "mozilla" target in
/usr/ports/editors/openoffice-1.1/files/Makefile.mozilla - at this
point, no additional command line arguments are passed. However,
Makefile.mozilla doesn't quite build the subport itself, it delegates
the job to yet another make. And it does this by calling:
@cd ${WRKDIR}/mozilla ; ${MAKE} CXX="${CXX}" CC="${CC}"
CFLAGS="${CFLAGS}" USE_GCC=${USE_GCC} build WRKDIRPREFIX=""
This is the only place where command line arguments get appended. So my
guess is that at this point, some variables (most notably CFLAGS) get
set and cast in stone while gmake might expect to be able to change them
later on.
For example, look at the following file:
/usr/ports/editors/openoffice-1.1/work/mozilla/work/mozilla/nsprpub/config/config.mk
You will find these two lines:
CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
If this doesn't work, then no wonder heaps of defines, includes and
other flags miraculously disappear from the command used to compile now.c.
The easiest fix would seem to be to force the FreeBSD make that gets
called with command line parameters to *not* pass those on in MAKEFLAGS.
Unfortunately, I couldn't find any information in the man page on how to
do that. In gmake, passing on is default, but can be disabled by
"unexporting" certain variables.
- Bartosz
More information about the freebsd-openoffice
mailing list