User forums > Help

Custom Makefile build does not produce same output as command line

(1/1)

mark1977:
Hi ,

I am using cb svn 8455 on Linux.

When I use a custom Makefile, the result of building the project is:

--- Code: ---Running command: make -f /home/mark/Codes/CPC3/Makefile Debug
make: *** No rule to make target `CPbnd_mpi.cpp', needed by `CPbnd_mpi.o'. Stop.
--- End code ---

This is strange to me, it's almost as if cb is using an olf Makefile. When I copy and paste the above command onto the command line, the make proceeds fine without any errors.

If I go to project properties then I am using a custom makefile: /home/mark/Codes/CPC3/Makefile
and the box underneath is checked.

Why does the build not produce the same result as the command line?

Thanks,

Mark

stahta01:
Are you using the same make executable file?
What is the working folder you are running the command in?
Is Code::Blocks using the same working folder?
Code::Blocks typically defaults to using the same folder holding the project file as the working folder.

I am not sure what it uses for custom makefile projects.

Tim S.

Jenna:
The Makefile: textcontrol should contain just the makefiles name ("Makefile" in your case) and the Execution directory: field for the makefile should contain the path to it (either absolute or relative to the project) in your case "/home/mark/Codes/CPC3/" .

mark1977:
Thanks both for your help.

Jens' solution worked.

Navigation

[0] Message Index

Go to full version