Error while using Run Command by Build.bash!

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
majidfiruzimehr

Error while using Run Command by Build.bash!

#1 Unread post by majidfiruzimehr »

When I run Build.Bash, I face to an Error as per bellow. How can I remove this error? Any help , please. This is :
My Command for Running Build.Bash is as:

[majid@localhost upwelling1]$ ./build.bash
and the Reply I found is as bellow:

make: *** No rule to make target `clean'. Stop.
make: *** No targets specified and no makefile found. Stop.

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: Error while using Run Command by Build.bash!

#2 Unread post by m.hadfield »

Near the end of your build.bash file you should be able to see lines like the following

Code: Select all

# Go to the users source directory to compile. The options set above will
# pick up the application-specific code from the appropriate place.

 cd ${MY_ROMS_SRC}

#--------------------------------------------------------------------------
# Compile.
#--------------------------------------------------------------------------

# Remove build directory.

if [ $clean -eq 1 ]; then
  make clean
fi
In other words, the script cd's to the directory given by the environment variable MY_ROMS_SRC and then (unless instructed otherwise by arguments passed to the script) runs "make clean".

Your error is given by make, attempting to build the "clean" target, and says it can't find a makefile. There is a makefile at the top level in the ROMS distribution, eg. this one:

https://www.myroms.org/svn/src/trunk/makefile

So, at that point in the script, what is the value of MY_ROMS_SRC? If it's empty, cd will take you to your home directory. If it's not empty then it appears that it points to a directory that does not exist, or is not a ROMS distribution.

Post Reply