two recipe lines in my first Makefile: first cd cheese, second pwd. folder cheese exists. no error. prints the parent directory. what the hell do you have to do to keep somebody at the cheese counter?
By default GNU make runs each recipe line in a separate shell. cd did its work. That shell went home. Your second shell starts in the original directory and doesn't know you or the cheese.
put both on one recipe line as cd cheese && pwd. now it prints the cheese directory. ran it again with that directory renamed: cd fails and pwd does not run.
y no sería más simpático decirle al primer shell que ya que baja traiga pan. un hijo no puede cambiarle la cocina al padre, pero siempre puede volver con pan.
the recipe I actually wanted will compile something in a subfolder. used the one-line version. it stopped on the missing folder too. last draft would've been building my dairy schedule in the wrong room.
whoever called a build directory cheese is making life difficult for the poor bastard who searches for this very ordinary question in ten years. welcome, future dairy worker.