Ok,
let's check how your system looks like. You need at least
flex 2.5.4
bison 1.28 (or 1.35 or 1.75)
Additionally, I'd recommend to use gnu make.
First check if one of the following directories exists (or both):
/usr/sfw
/opt/sfw
Then check which files are in /usr/local/bin and/or /usr/sfw/bin and /opt/sfw/bin (especially gnu make, flex, bison and the other tools should be in one or more of the three directories).
Execute
which make
which sed
which gcc
which bash
to get the command directories.
Additionally, execute the commands
echo $PATH
echo $LD_LIBRARY_PATH
and post the results.
You can download precompiled sun packages of all neded tools at www.sunfreeware.com if they are not installed. Alternatively, use the companion cd to install the freeware packages but check if the versions are sufficient.
On the server I used to test stuff I installed the packages from sunfreeware.com.
Thomas