0

In my makefile I was trying to go into a different directory and invoke jam with something like:

jam-build:
    cd <somedirectory> && jam <target>

This did not work, but caused "Unknown target. Please edit 'Jamrules'." even though the exact same command on the command line works perfectly. So I know that jam can find the target.

I also tried

jam-build:
    sh -c "cd <somedirectory> && jam <target>"

and variations with the same results. Also this works perfectly from the command line.

Any other command instead of "jam " works as expected (ls, ps, cat, pwd).

Update: Even creating a Makefile in <somedirectory> and running make there gives the same result.

Any ideas to why this happens would be appreciated. And, of course, things to try.

I'm running cygwin with latest gnu make, FT-jam 2.5.2.

thoni56
  • 3,145
  • 3
  • 31
  • 49
  • The `Jamrules` file is in `` and running `jam jam-build` or `jam ` from in that directory in the shell works? But using that same `` in the makefile command doesn't work? What does `jam --version` (or equivalent) and `type -a jam` return in your shell and in your makefile? – Etan Reisner Jun 14 '15 at 12:00
  • Exactly the same things: **$ type -a jam && jam -v jam is /usr/bin/jam FT-Jam 2.5.2. OS=CYGWIN**. and **$ make cd && type -a jam && jam -v jam is /usr/bin/jam FT-Jam 2.5.2. OS=CYGWIN** Very strange... – thoni56 Jun 15 '15 at 06:35

0 Answers0