aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/markdown/Subprojects.md2
-rw-r--r--docs/markdown/Using-wraptool.md2
-rw-r--r--docs/markdown/Wrap-dependency-system-manual.md4
-rw-r--r--mesonbuild/coredata.py13
-rw-r--r--mesonbuild/environment.py3
-rw-r--r--mesonbuild/mesonmain.py28
-rw-r--r--mesonbuild/optinterpreter.py2
-rw-r--r--mesonbuild/scripts/gtkdochelper.py3
-rw-r--r--syntax-highlighting/vim/indent/meson.vim4
9 files changed, 22 insertions, 39 deletions
diff --git a/docs/markdown/Subprojects.md b/docs/markdown/Subprojects.md
index 85453e3..923b6a3 100644
--- a/docs/markdown/Subprojects.md
+++ b/docs/markdown/Subprojects.md
@@ -42,7 +42,7 @@ else
l = sp.get_variable('l')
endif
exe = executable('prog', 'prog.c', include_directories : i, link_with : l,
- deps : dep, install : true)
+ dependencies : dep, install : true)
```
With this setup the system dependency is used when it is available, otherwise we fall back on the bundled version.
diff --git a/docs/markdown/Using-wraptool.md b/docs/markdown/Using-wraptool.md
index e000695..8e5f898 100644
--- a/docs/markdown/Using-wraptool.md
+++ b/docs/markdown/Using-wraptool.md
@@ -53,7 +53,7 @@ To check if your projects are up to date you can issue the `status` command.
In this case `zlib` has a newer release available. Updating it is straightforward:
- $ wraptool.py update zlib
+ $ wraptool update zlib
Updated zlib to branch 1.2.8 revision 4
Wraptool can do other things besides these. Documentation for these can be found in the command line help, which can be accessed by `wraptool --help`.
diff --git a/docs/markdown/Wrap-dependency-system-manual.md b/docs/markdown/Wrap-dependency-system-manual.md
index a850896..d97fc9a 100644
--- a/docs/markdown/Wrap-dependency-system-manual.md
+++ b/docs/markdown/Wrap-dependency-system-manual.md
@@ -52,7 +52,7 @@ are downloaded and automatically applied to the subproject. These
files contain a Meson build definition for the given subproject. A
wrap file with an additional patch URL would look like this.
-```
+```ini
[wrap-file]
directory = libfoobar-1.0
@@ -83,7 +83,7 @@ packaged files. Sometimes you want to check code out directly from
Git. Meson supports this natively. All you need to do is to write a
slightly different wrap file.
-```
+```ini
[wrap-git]
directory=samplesubproject
url=https://github.com/jpakkane/samplesubproject.git
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index cf5f077..ba5d2ac 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -29,9 +29,6 @@ class UserOption:
self.choices = choices
self.description = description
- def parse_string(self, valuestring):
- return valuestring
-
# Check that the input is a valid value and return the
# "cleaned" or "native" version. For example the Boolean
# option could take the string "true" and return True.
@@ -72,13 +69,6 @@ class UserBooleanOption(UserOption):
def set_value(self, newvalue):
self.value = self.tobool(newvalue)
- def parse_string(self, valuestring):
- if valuestring == 'false':
- return False
- if valuestring == 'true':
- return True
- raise MesonException('Value "%s" for boolean option "%s" is not a boolean.' % (valuestring, self.name))
-
def __bool__(self):
return self.value
@@ -109,9 +99,6 @@ class UserIntegerOption(UserOption):
except:
raise MesonException('Value string "%s" is not convertable to an integer.' % valuestring)
- def parse_string(self, valuestring):
- return self.toint(valuestring)
-
def validate_value(self, value):
return self.toint(value)
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index a746cab..7f07c8d 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -349,10 +349,9 @@ class Environment:
def is_cross_build(self):
return self.cross_info is not None
- def dump_coredata(self, mtime):
+ def dump_coredata(self):
cdf = os.path.join(self.get_build_dir(), Environment.coredata_file)
coredata.save(self.coredata, cdf)
- os.utime(cdf, times=(mtime, mtime))
return cdf
def get_script_dir(self):
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index 45e6026..8ecfacd 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -193,23 +193,19 @@ class MesonApp:
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)
- dumpfile = os.path.join(env.get_scratch_dir(), 'build.dat')
- with open(dumpfile, 'wb') as f:
- pickle.dump(b, f)
- # Write this as late as possible since we use the existence of this
- # file to check if we generated the build file successfully, so we
- # don't want an error that pops up during generation, 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.
- #
- # 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.
- cdf = env.dump_coredata(coredata_mtime)
- # Post-conf scripts must be run after writing coredata or else introspection fails.
try:
+ # We would like to write coredata as late as possible since we use the existence of
+ # this file to check if we generated the build file successfully. Since coredata
+ # includes settings, the build files must depend on it and appear newer. However, due
+ # to various kernel caches, we cannot guarantee that any time in Python is exactly in
+ # sync with the time that gets applied to any files. Thus, we dump this file as late as
+ # possible, but before build files, and if any error occurs, delete it.
+ cdf = env.dump_coredata()
+ g.generate(intr)
+ dumpfile = os.path.join(env.get_scratch_dir(), 'build.dat')
+ with open(dumpfile, 'wb') as f:
+ pickle.dump(b, f)
+ # Post-conf scripts must be run after writing coredata or else introspection fails.
g.run_postconf_scripts()
except:
os.unlink(cdf)
diff --git a/mesonbuild/optinterpreter.py b/mesonbuild/optinterpreter.py
index 4b8e147..01dd036 100644
--- a/mesonbuild/optinterpreter.py
+++ b/mesonbuild/optinterpreter.py
@@ -180,5 +180,5 @@ class OptionInterpreter:
if opt.description == '':
opt.description = opt_name
if opt_name in self.cmd_line_options:
- opt.set_value(opt.parse_string(self.cmd_line_options[opt_name]))
+ opt.set_value(self.cmd_line_options[opt_name])
self.options[opt_name] = opt
diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py
index 45ed96b..4406b28 100644
--- a/mesonbuild/scripts/gtkdochelper.py
+++ b/mesonbuild/scripts/gtkdochelper.py
@@ -112,7 +112,8 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
scanobjs_cmd = ['gtkdoc-scangobj'] + scanobjs_args + ['--types=' + gobject_typesfile,
'--module=' + module,
'--cflags=' + cflags,
- '--ldflags=' + ldflags]
+ '--ldflags=' + ldflags,
+ '--ld=' + ld]
gtkdoc_run_check(scanobjs_cmd, abs_out)
diff --git a/syntax-highlighting/vim/indent/meson.vim b/syntax-highlighting/vim/indent/meson.vim
index b00c942..8553ec0 100644
--- a/syntax-highlighting/vim/indent/meson.vim
+++ b/syntax-highlighting/vim/indent/meson.vim
@@ -78,7 +78,7 @@ function GetMesonIndent(lnum)
" When inside parenthesis: If at the first line below the parenthesis add
- " two 'shiftwidth', otherwise same as previous line.
+ " a 'shiftwidth', otherwise same as previous line.
" i = (a
" + b
" + c)
@@ -97,7 +97,7 @@ function GetMesonIndent(lnum)
if pp > 0
return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
endif
- return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2))
+ return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : shiftwidth())
endif
if plnumstart == p
return indent(plnum)