evmar / n2

n2 ("into"), a ninja compatible build system
Apache License 2.0
356 stars 26 forks source link

`$rspfile` in command is not evaluated properly #119

Open hikerpig opened 2 months ago

hikerpig commented 2 months ago

For example, when I run n2 test and check rspoutput.txt.

Expected to see 'test.rsp' , this is what ninja test generates.

But actually with n2, I got an empty rspoutput.txt file.

build build.ninja.stamp: phony
  generator = 1
  depfile = build.ninja.d

rule echo_rsp
  rspfile = test.rsp
  rspfile_content = some texts
  command = echo $rspfile > rspoutput.txt

build test: echo_rsp
Colecf commented 1 month ago

We discussed this in https://github.com/evmar/n2/pull/94, Evan was hesitant to add this behavior, and in my case, updating Android to not rely on it was simple enough.