From a3ed04f37c47e2eaa83d87dda2ec4ab060a7a2d0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 2 Jun 2020 07:35:44 +0200 Subject: Add process_path_ex with program stable name and checksum --- libbuild2/bin/init.cxx | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'libbuild2/bin') diff --git a/libbuild2/bin/init.cxx b/libbuild2/bin/init.cxx index 4af3c1d..a1ac61e 100644 --- a/libbuild2/bin/init.cxx +++ b/libbuild2/bin/init.cxx @@ -574,11 +574,8 @@ namespace build2 { auto& vp (rs.var_pool ()); - vp.insert ("bin.ar.path"); - vp.insert ("bin.ranlib.path"); - - vp.insert ("config.bin.ar"); - vp.insert ("config.bin.ranlib"); + vp.insert ("config.bin.ar"); + vp.insert ("config.bin.ranlib"); } // Configuration. @@ -672,7 +669,8 @@ namespace build2 } } - rs.assign ("bin.ar.path") = move (ari.ar_path); + rs.assign ("bin.ar.path") = + process_path_ex (move (ari.ar_path), "ar", ari.ar_checksum); rs.assign ("bin.ar.id") = move (ari.ar_id); rs.assign ("bin.ar.signature") = move (ari.ar_signature); rs.assign ("bin.ar.checksum") = move (ari.ar_checksum); @@ -689,8 +687,12 @@ namespace build2 if (ranlib != nullptr) { - rs.assign ("bin.ranlib.path") = move (ari.ranlib_path); - rs.assign ("bin.ranlib.id") = move (ari.ranlib_id); + rs.assign ("bin.ranlib.path") = + process_path_ex (move (ari.ranlib_path), + "ranlib", + ari.ranlib_checksum); + rs.assign ("bin.ranlib.id") = + move (ari.ranlib_id); rs.assign ("bin.ranlib.signature") = move (ari.ranlib_signature); rs.assign ("bin.ranlib.checksum") = @@ -741,8 +743,7 @@ namespace build2 { auto& vp (rs.var_pool ()); - vp.insert ("bin.ld.path"); - vp.insert ("config.bin.ld"); + vp.insert ("config.bin.ld"); } // Configuration. @@ -804,7 +805,8 @@ namespace build2 << " checksum " << ldi.checksum; } - rs.assign ("bin.ld.path") = move (ldi.path); + rs.assign ("bin.ld.path") = + process_path_ex (move (ldi.path), "ld", ldi.checksum); rs.assign ("bin.ld.id") = move (ldi.id); rs.assign ("bin.ld.signature") = move (ldi.signature); rs.assign ("bin.ld.checksum") = move (ldi.checksum); @@ -881,8 +883,7 @@ namespace build2 { auto& vp (rs.var_pool ()); - vp.insert ("bin.rc.path"); - vp.insert ("config.bin.rc"); + vp.insert ("config.bin.rc"); } // Configuration. @@ -926,7 +927,8 @@ namespace build2 << " checksum " << rci.checksum; } - rs.assign ("bin.rc.path") = move (rci.path); + rs.assign ("bin.rc.path") = + process_path_ex (move (rci.path), "rc", rci.checksum); rs.assign ("bin.rc.id") = move (rci.id); rs.assign ("bin.rc.signature") = move (rci.signature); rs.assign ("bin.rc.checksum") = move (rci.checksum); -- cgit v1.1