-
Notifications
You must be signed in to change notification settings - Fork 178
Q0115
What does Can't open ../scripts/newer*: No such file or directory* mean? I got it while trying to build Exim.
You are using FreeBSD, or another OS that has a make command which tries to optimize the running of commands. Exim's Makefile contains targets with sequential commands like this:
buildpcre:
@cd pcre; $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" \
CFLAGS="$(CFLAGS) $(PCRE_CFLAGS)" \
RANLIB="$(RANLIB)" HDRS="$(PHDRS)" \
INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)"
@if $(SHELL) $(SCRIPTS)/newer pcre/libpcre.a exim; then \
/bin/rm -f exim eximon.bin; fi
The second command assumes that the cd pcre
in the first command is no
longer in effect. If you have -j3
in your default set of MAKEFLAGS
,
FreeBSD make tries to optimize, and ends up up with both commands in
the same shell process. The result is that $(SCRIPTS)
(which has a
value of ../scripts
) is not found. The simplest solution is to force
make to use backwards compatibility mode with each command in its own
shell, by using the -B
flag. To ensure that this happens throughout
the build, it's best to export it in your environment:
MAKEFLAGS='-B'
ort MAKEFLAGS
e