In Linux, is ‘make folder/path/clean’ same as running ‘make clean’ command in folder/path

directorymake

I'm new to Linux, more so for Makefile.

In Linux, is 'make folder/path/clean' same as running 'make clean' command in folder/path/?

(folder/path/ refers to an arbitrary directory.)

Apart from this question, is there a generalization one can make about this syntax (of command and argument) in Linux?

Update based on comments and suggested answers:
Thanks, I learned some new things. I also found that Makefile that I am using (openwrt) is different from the normal GNU Makefile in that it has more features.

A summary is that that the two commands in the main question are not the same.

Best Answer

To execute make clean in folder/path, you want

make -C folder/path clean

The -C switch is not POSIX, though (see the comments). It works, at least, for GNU make, which is the make you have if you're running Linux.

Related Question