File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6363#
6464
6565CABAL_BIN =cabal
66- PWD := $(shell /bin/ pwd)
66+ PWD := $(shell pwd)
6767
6868# There's a lot of parallelism in the schema-generated code
6969# If you have >=16G and >=4 cores, trying passing these:
@@ -243,13 +243,25 @@ thrift:: thrift-compiler thrift-hs
243243thrift-hs :: thrift-hsthrift-hs thrift-glean-hs
244244
245245.PHONY : thrift-compiler
246+ # Allow injecting a prebuilt thrift compiler by setting THRIFT_COMPILE in
247+ # environment (e.g. with Nix).
248+ ifndef THRIFT_COMPILE
246249thrift-compiler ::
247250 (cd hsthrift && make CABAL=" $( CABAL) " compiler)
248251 $(eval THRIFT_COMPILE := $$(shell $$(CABAL ) -v0 list-bin exe:thrift-compiler) )
252+ else
253+ thrift-compiler ::
254+ # no-op
255+ endif
249256
250257.PHONY : thrift-hsthrift-hs
258+ ifndef THRIFT_COMPILE
251259thrift-hsthrift-hs ::
252260 (cd hsthrift && make CABAL=" $( CABAL) " thrift-hs)
261+ else
262+ thrift-hsthrift-hs ::
263+ # no-op
264+ endif
253265
254266.PHONY : gen-schema
255267gen-schema :: glean.cabal cxx-libraries
You can’t perform that action at this time.
0 commit comments