[Asterisk-Dev] gmake issues

Luigi Rizzo rizzo at icir.org
Tue Nov 29 04:49:50 MST 2005


Hi,
on FreeBSD 4.11 with gmake 3.80 and today's svn sources
i am seeing a lot of these "[: trunk: unexpected operator"
messages below:

	> gmake | & more
	build_tools/make_version_h > include/asterisk/version.h.tmp
	[: trunk: unexpected operator
	[: trunk: unexpected operator
	[: trunk: unexpected operator
	[: trunk: unexpected operator
	if cmp -s include/asterisk/version.h.tmp include/asterisk/version.h ; then echo;
	 else \
		mv include/asterisk/version.h.tmp include/asterisk/version.h ; \
	fi

	rm -f include/asterisk/version.h.tmp

basically they happen every time the first command of a rule
is started, e.g. if i have

	foo:
		echo "doing foo"

i see in the output

	echo "doing foo"
	[: trunk: unexpected operator
	[: trunk: unexpected operator
	[: trunk: unexpected operator
	[: trunk: unexpected operator
	doing foo

and so on.
If i remove the '.EXPORT_ALL_VARIABLES:'
from the beginning of the file, the messages disappear, but then of
course i am not sure the build is correct.

Any ideas ? It has to do with the way the shell is invoked
because if put SHELL=/my/own/command in the makefile, i see the
output of my command and none of the 'unexpected operator'
messages. Changing /bin/sh with /usr/local/bin/bash however
does not help, and gmake is a bit too smart in handling shell
commands for me to be able to follow what is going on.

	cheers
	luigi


	



More information about the asterisk-dev mailing list