From d3b174246524c89a0c7ac559d2a00b5ebdd5cd80 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 19 Jun 2019 10:41:03 +0200 Subject: [PATCH 1/2] build.jl: refactor how we invoke configure With the new variant, it's trivial to keep the debug and non-debug settings in sync; also, if people add or remove configure options, that is now easy to see in a diff. --- deps/build.jl | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index 1ac82afa2..11078ac79 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -92,11 +92,29 @@ end cd(joinpath(wdir, "Singular_build")) withenv("CPP_FLAGS"=>"-I$vdir/include", "LD_LIBRARY_PATH"=>"$vdir/lib:$nemodir/lib") do - if !debug_build - run(`$srcs/configure --prefix=$vdir --disable-static --enable-p-procs-static --disable-p-procs-dynamic --disable-gfanlib --enable-shared --with-gmp=$nemovdir --with-flint=$nemovdir --with-ntl=$vdir --without-python --with-readline=no`) - else - run(`$srcs/configure --prefix=$vdir --disable-static --enable-p-procs-static --disable-p-procs-dynamic --disable-gfanlib --enable-shared --with-gmp=$nemovdir --with-flint=$nemovdir --with-ntl=$vdir --without-python --with-readline=no --with-debug --enable-debug --disable-optimizationflags`) - end + cmd = split( + """ + $srcs/configure + --prefix=$vdir + --disable-static + --enable-p-procs-static + --disable-p-procs-dynamic + --disable-gfanlib + --enable-shared + --with-gmp=$nemovdir + --with-flint=$nemovdir + --with-ntl=$vdir + --without-python + --with-readline=no + """, "\n", keepempty = false) + if debug_build + append!(cmd, [ + "--with-debug", + "--enable-debug", + "--disable-optimizationflags", + ]) + end + run(Cmd(cmd)) withenv("LDFLAGS"=>LDFLAGS) do run(`make -j4`) run(`make install`) From 972a2b9f934b870f3e215902b70c0e33c918af4a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 19 Jun 2019 23:55:38 +0200 Subject: [PATCH 2/2] Update deps/build.jl Co-Authored-By: thofma --- deps/build.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/build.jl b/deps/build.jl index 11078ac79..8763956d2 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -114,7 +114,7 @@ withenv("CPP_FLAGS"=>"-I$vdir/include", "LD_LIBRARY_PATH"=>"$vdir/lib:$nemodir/l "--disable-optimizationflags", ]) end - run(Cmd(cmd)) + run(Cmd(string.(cmd))) withenv("LDFLAGS"=>LDFLAGS) do run(`make -j4`) run(`make install`)