I'm trying to use GN to build Crashpad by calling it from a makefile, which contains information about the directory structure the build is taking place in. For example, I am calling gn from the makefile via a command which looks like this:
GN_OPTIONS := --root=$(PROD_SOURCES) --script-executable=$(PYTHON3)
gn gen $(CRASHPAD_TARGET_LOCATION) $(GN_OPTIONS)
I've discovered that I need to express a dependency on curl on Linux, i.e. I need "-I[relative path]/curl/include" on the compile line.
However, this path information is contained in a value stored in $CHANGE_NUMBER, which exists in the makefile context, but not in GN's. If I try to do something like:
include_dirs = [ "$CHANGE_NUMBER/curl/include" ]
in the relevant BUILD.gn file, GN can't parse that. Is there a way to access these variables from inside GN's context? Could I pass them as an argument to GN in some way (like how I'm doing with --root and --script-executable)?