summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormottelet <stephane.mottelet@utc.fr>2020-10-19 10:36:42 +0200
committerClement DAVID <clement.david@esi-group.com>2021-01-21 22:19:07 +0100
commitfb164e7a38167a8efaedaa155b4db4357f0e8a5a (patch)
tree3562c5b74827723d4f784b5f0554eef8399dd08e
parent0f28a68b9bb978e54ef93eb55c10a4eade943f65 (diff)
downloadscilab-6.1.zip
scilab-6.1.tar.gz
[dynamic_link] prevent reconfigure for same compilation flags6.1
Change-Id: I47b49b67fe964b8cb2763bd50fcd09a62162069d
-rw-r--r--scilab/modules/dynamic_link/macros/ilib_gen_Make_unix.sci32
1 files changed, 20 insertions, 12 deletions
diff --git a/scilab/modules/dynamic_link/macros/ilib_gen_Make_unix.sci b/scilab/modules/dynamic_link/macros/ilib_gen_Make_unix.sci
index bd7abbe..595b508 100644
--- a/scilab/modules/dynamic_link/macros/ilib_gen_Make_unix.sci
+++ b/scilab/modules/dynamic_link/macros/ilib_gen_Make_unix.sci
@@ -158,18 +158,14 @@ function ilib_gen_Make_unix(names, ..
158 end 158 end
159 end 159 end
160 160
161 if ldflags <> "" | cflags <> "" | fflags <> "" | cc <> "" | fileinfo(usercommandpath+"/Makefile.orig") == [] | fileinfo(usercommandpath+"/libtool") == [] then 161 stringToHash = libname + ldflags + cflags + fflags + cc;
162 // Makefile.orig doesn't exists or may be invalid regarding the flags 162 hash = getmd5(stringToHash,"string");
163 // run the ./configure with the flags 163 md5file = fullfile(usercommandpath,libname+".md5");
164 164 if stringToHash == libname || (isfile(md5file) && ...
165 if ( ilib_verbose() == 2 ) then 165 mgetl(md5file) == hash && ...
166 mprintf(gettext(" %s: Need to run the compiler detection (configure).\n"),"ilib_gen_Make"); 166 isfile(usercommandpath+"/Makefile.orig") && ...
167 end 167 isfile(usercommandpath+"/libtool"))
168 168 // Reuse existing Makefile.orig because compilation flags are all empty or unchanged since last call
169 mdelete(linkBuildDir+"/Makefile.orig");
170 generateConfigure(linkBuildDir, ldflags, cflags, fflags, cc)
171 else
172 // Reuse existing Makefile.orig because compilation flags are all empty
173 [status,msg]=copyfile(usercommandpath+"/Makefile.orig",linkBuildDir); 169 [status,msg]=copyfile(usercommandpath+"/Makefile.orig",linkBuildDir);
174 170
175 if ( ilib_verbose() == 2 ) then 171 if ( ilib_verbose() == 2 ) then
@@ -189,6 +185,18 @@ function ilib_gen_Make_unix(names, ..
189 // (just try "touch configure Makefile; make" on any autoconf project) 185 // (just try "touch configure Makefile; make" on any autoconf project)
190 sleep(1000); 186 sleep(1000);
191 unix_g("touch Makefile"); 187 unix_g("touch Makefile");
188 else
189 // Makefile.orig doesn't exists or may be invalid regarding the flags
190 // run the ./configure with the flags
191
192 mputl(hash,md5file)
193
194 if ( ilib_verbose() == 2 ) then
195 mprintf(gettext(" %s: Need to run the compiler detection (configure).\n"),"ilib_gen_Make");
196 end
197
198 mdelete(linkBuildDir+"/Makefile.orig");
199 generateConfigure(linkBuildDir, ldflags, cflags, fflags, cc)
192 end 200 end
193 201
194 // Alter the Makefile in order to compile the right files 202 // Alter the Makefile in order to compile the right files