moskewcz / boda

Boda: A C++ Framework for Efficient Experiments in Computer Vision
Other
63 stars 12 forks source link

No rule to make clean? #7

Closed forresti closed 8 years ago

forresti commented 8 years ago
forresti@a18:~/boda$ make clean
make: *** No rule to make target `clean'.  Stop.

Strange. There is a clean: definition in the Makefile. Is boda supposed to have working make clean functionality?

moskewcz commented 8 years ago

short answer: after the first time, run make in boda/obj, not in boda.

interesting. the build system is designed to be run from a build directory. this is boda/obj by default. the makefile includes some magic to let you run it from the boda directory, which makes the obj directory for you (along with lib and run directories), cd's into it, and re-runs make. it will sorta-complain about it (although it is the intended use mode):

moskewcz@maaya:~/git_work/boda$ make
./makefile is not a symlink. creating ./obj,./lib,./run; symlinking to makefile in ./obj; running make in ./obj
mkdir -p obj run lib && ln -sf ../makefile obj/makefile && cd obj && make

in general, i run make the first time from the boda base directory, and subsequent times from the boda/obj directory, so i don't have to look at that message. but, in your case, you're always running in the boda base directoty, and it seems the 'magic' doesn't work for specific targets, including clean:

moskewcz@maaya:~/git_work/boda$ make caffe_fwd.o
make: *** No rule to make target `caffe_fwd.o'.  Stop.

but from the obj dir, all is well:

moskewcz@maaya:~/git_work/boda$ cd obj
moskewcz@maaya:~/git_work/boda/obj$ make caffe_fwd.o
py_prebuild_rm_okay: 
py_prebuild_hook:  wrappers up to date.
make: `caffe_fwd.o' is up to date.

i'm not sure if this is fixable exactly or what else i might do to avoid the issue. maybe i can somehow avoid the need for the 'first time build' flow that creates the directories, perhaps by having all the needed directories include in the repo as empty dirs with 'gitignore everything' files. then the user would simply always build from boda/obj, including the first time, and there would be no potential for this issue.

anyway i'll leave this issue open for now.