Closed giuliomoro closed 5 years ago
faust -json foo.dsp
produces a foo.dsp.json
file with this information in the "library_list" key. Is this OK for your need ?
right, I guess I can parse that (as long as it's guaranteed not to contain line breaks!). However, this generates the .json
file in the same folder as the source .dsp
file. Is this expected? Is there a way to change the place it is generated, so that it can go in a temp folder, or in the destination folder of the .cpp
file?
Yes, use -O, like: faust -O tmp -json noise.dsp -o noise.cpp
ok, this should do the trick:
echo render.cpp: `{ grep library_list virtualAnalog.dsp.json | sed "s/.*\[//" | sed "s/\].*//" | sed "s/,/ /g"; }` > mkfile.inc
You can pass to
gcc
orclang
something like-MMD -MP -MF"$(@:%.o=%.d)"
to generate a.d
file that explicitly declares dependencies. So for instance if you compile filea.cpp
that includes filea.h
, you get ina.d
:Is it, or would it be, possible for
faust
to output a similar file, clearly showing whatdsp
files and libraries are being used whenever you pass a given.dsp
file as the input of afaust
command? This way it would be easier for amake
-based build system to find out when changes to the.dsp
files are made that would require running thefaust
command again.