1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-08 18:02:05 +03:00

fbcode_builder: getdeps: add MakeBuilder

Summary:
the make builder runs `make` in the source directory.
The `make.args` section from the manifest is passed as arguments
to the `make` invocation.

Reviewed By: simpkins

Differential Revision: D14690996

fbshipit-source-id: 180d657ad05f0c0266a8c1d30979d8d1473958c9
This commit is contained in:
Wez Furlong
2019-05-03 15:52:39 -07:00
committed by Facebook Github Bot
parent 04a5ea2f97
commit 6fa72196f4
2 changed files with 20 additions and 0 deletions

View File

@@ -88,3 +88,18 @@ class BuilderBase(object):
that the sources have changed in such a way that the build
system needs to regenerate its rules. """
pass
class MakeBuilder(BuilderBase):
def __init__(self, build_opts, ctx, manifest, src_dir, build_dir, inst_dir, args):
super(MakeBuilder, self).__init__(
build_opts, ctx, manifest, src_dir, build_dir, inst_dir
)
self.args = args or []
def _build(self, install_dirs, reconfigure):
cmd = ["make", "-j%s" % self.build_opts.num_jobs] + self.args
self._run_cmd(cmd)
install_cmd = ["make", "install", "PREFIX=" + self.inst_dir]
self._run_cmd(install_cmd)