If I have a rule in my makefile like this:
subdir/object:
cd subdir && do_stuff_to_build_object
Do I need to add && cd ..
to the end of the rule, so that make
ends up in the same directory at the end of running it as it started? Or does make
run the rule in a subshell or otherwise shield itself from things like changing directories? In other words, after executing that rule, will subsequent rules be executed in subdir/
instead of where I want them?