aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonmain.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-07-29 08:18:07 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-07-29 08:18:59 +0530
commit018fa4b90f80b6d3c27583af55dd50c35e1a9359 (patch)
tree83fc24642bbe719b3994b8ab8e9f7cb7621c5346 /mesonbuild/mesonmain.py
parent4a92b78e6e4508afb8ca988cb47c91ea4a765fee (diff)
downloadmeson-018fa4b90f80b6d3c27583af55dd50c35e1a9359.zip
meson-018fa4b90f80b6d3c27583af55dd50c35e1a9359.tar.gz
meson-018fa4b90f80b6d3c27583af55dd50c35e1a9359.tar.bz2
vs: Fix regen_checker by using the correct coredata mtime
After c01b183e5, the mtime of coredata.dat is always newer than all the other build files, which made regen_checker think that they always had to be regenerated. Now we set the mtime of the file to a value before the build files are generated and that makes everything behave as it did earlier.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r--mesonbuild/mesonmain.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index e61c602..e002d9a 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -15,7 +15,7 @@
# limitations under the License.
import sys, stat, traceback, pickle, argparse
-import datetime
+import time, datetime
import os.path
from . import environment, interpreter, mesonlib
from . import build
@@ -164,6 +164,7 @@ itself as required.'''
mlog.log('Build machine cpu family:', mlog.bold(intr.builtin['build_machine'].cpu_family_method([], {})))
mlog.log('Build machine cpu:', mlog.bold(intr.builtin['build_machine'].cpu_method([], {})))
intr.run()
+ coredata_mtime = time.time()
g.generate(intr)
g.run_postconf_scripts()
dumpfile = os.path.join(env.get_scratch_dir(), 'build.dat')
@@ -173,7 +174,11 @@ itself as required.'''
# that pops up during generation, post-conf scripts, etc to cause us to
# incorrectly signal a successful meson run which will cause an error
# about an already-configured build directory when the user tries again.
- env.dump_coredata()
+ #
+ # However, we set the mtime to an earlier value to ensure that doing an
+ # mtime comparison between the coredata dump and other build files
+ # shows the build files to be newer, not older.
+ env.dump_coredata(coredata_mtime)
def run_script_command(args):
cmdname = args[0]