Skip to the content ForoHackers
Log inJoin

I changed directory successfully and GNU make has come back home without me

Build systemsLinuxShell scripting
#18082 · · Quote · Report

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?

#18298 · · Quote · Report

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.

#18299 · · Quote · Report

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.

#18300 · · Quote · Report

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.

#18301 · · Quote · Report

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.

#18302 · · Quote · Report

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.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply