in Duo/ConfigureMakeInstaller.py [0:0]
def main(self):
conf_path = self.env["installer_dir_path"]
makefile = os.path.join(conf_path, "Makefile")
os.chdir(conf_path)
cmd = ["./configure"]
if self.env["prefix_path"]:
cmd.append("--prefix=" + self.env["prefix_path"])
# ./configure
self.output("Command: %s" % cmd)
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(conf_out, conf_err) = proc.communicate()
if conf_err:
raise ProcessorError("./configure error: %s" % conf_err)
self.output(conf_out)
# make
self.output("Running make")
cmd = ["/usr/bin/make", "-f", makefile]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(m_out, m_err) = proc.communicate()
# if m_err:
# raise ProcessorError("make error: %s" % m_err)
self.output(m_out)
# make install
self.output("Running make install")
destpath = self.env.get("output_path")
cmd = ["/usr/bin/make", "install", "-f", makefile]
if destpath:
cmd.append("DESTDIR=" + destpath)
self.output("install cmd: %s" % cmd)
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(mi_out, mi_err) = proc.communicate()
# if mi_err:
# raise ProcessorError("make install error: %s" % mi_err)
self.output(mi_out)