[CMake] Error using cygwin with Matlab2007a installed

Dirk Colbry dirk at colbry.com
Thu Sep 27 12:42:26 EDT 2007


Both which and gmake commands point to the gmake file in MATLAB as the first
in my path directory.  However, when I look at my PATH directory the
/usr/bin folder is first in the path list (see print outs at the end of this
message).

I check the /usr/bin directory and it does not contain the gmake file.
Instead it contains only the make file.  From this, I assume that cmake is
first searching for gmake and if it does not find it, it looks for make.  I
tested this assumption by adding a symbolic link to the /usr/bin directory
($ ln -s /usr/bin/make /usr/bin/gmake) and the build worked fine again
without the need to redefine my make filepath in cmake.

Now I am still scratching my head over a few questions:

1. Why didn't the MATLAB version of gmake work?  My guess is that since the
MATLAB version of gmake is built for windows, it is having difficulty with
the cygwin directory structure.

2. What is the difference between gmake and make? I Googled this one and
found that gmake stands for GNU make and it is basically the same as make
although different versions do exist and it can depend on the platform you
are using.

3. The version of make in my install of cygwin is GNU Make 3.81 so why
didn't cygwin have links to both gmake and make?  (this is obviously a
cygwin question and not a cmake question).

3. Why does cmake search for gmake before make?  I am sure there is a
historical or logical reason for this, I just could not find it.

Thanks for your help,

Dirk

$ which gmake
/cygdrive/c/Program Files/Matlab/R2007a/bin/win32/gmake

$ gmake --help
Usage: c:\Program Files\Matlab\R2007a\bin\win32\gmake.exe [options] [target]
...

Options:
  -b, -m                      Ignored for compatibility.
  -B, --always-make           Unconditionally make all targets.
  -C DIRECTORY, --directory=DIRECTORY
                              Change to DIRECTORY before doing anything.
  -d                          Print lots of debugging information.
  --debug[=FLAGS]             Print various types of debugging information.
  -e, --environment-overrides
                              Environment variables override makefiles.
  -f FILE, --file=FILE, --makefile=FILE
                              Read FILE as a makefile.
  -h, --help                  Print this message and exit.
  -i, --ignore-errors         Ignore errors from commands.
  -I DIRECTORY, --include-dir=DIRECTORY
                              Search DIRECTORY for included makefiles.
  -j [N], --jobs[=N]          Allow N jobs at once; infinite jobs with no
arg.
  -k, --keep-going            Keep going when some targets can't be made.
  -l [N], --load-average[=N], --max-load[=N]
                              Don't start multiple jobs unless load is below
N.
  -n, --just-print, --dry-run, --recon
                              Don't actually run any commands; just print
them.
  -o FILE, --old-file=FILE, --assume-old=FILE
                              Consider FILE to be very old and don't remake
it.
  -p, --print-data-base       Print make's internal database.
  -q, --question              Run no commands; exit status says if up to
date.
  -r, --no-builtin-rules      Disable the built-in implicit rules.
  -R, --no-builtin-variables  Disable the built-in variable settings.
  -s, --silent, --quiet       Don't echo commands.
  -S, --no-keep-going, --stop
                              Turns off -k.
  -t, --touch                 Touch targets instead of remaking them.
  -v, --version               Print the version number of make and exit.
  -w, --print-directory       Print the current directory.
  --no-print-directory        Turn off -w, even if it was turned on
implicitly.
  -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
                              Consider FILE to be infinitely new.
  --warn-undefined-variables  Warn when an undefined variable is referenced.

This program built for Windows32
Report bugs to <bug-make at gnu.org>

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/cygdri
ve/c/WINDOWS:/cygdrive/c/WINDOWS/system32/wbem:/cygdrive/c/program
files/common
files/roxio shared/dllshared/:/cygdrive/c/Program
Files/Matlab/R2007a/bin:/cygdr
ive/c/Program Files/Matlab/R2007a/bin/win32:/cygdrive/c/Program Files/SSH
Commun
ications Security/SSH Secure Shell

-- 
Dr. Dirk Colbry
Assistant Research Professor
Center for Cognitive Ubiquitous Computing
School of Computing and Informatics
Arizona State University
http://www.dirk.colbry.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070927/e80da9ba/attachment.htm


More information about the CMake mailing list