summaryrefslogtreecommitdiffstats
path: root/scripts/ninjatool.py
Commit message (Collapse)AuthorAgeFilesLines
* ninjatool: rebuild multi-output targets if outputs are missingPaolo Bonzini2020-09-301-0/+3
| | | | | | | | | | | | | | The "stamp file trick" used to group targets of a single multi-output rule prevents the user from deleting one such target in order to force its rebuild. Doing so will not touch the stamp file, and therefore only the dummy ":" command will be executed. With this patch, ninjatool writes rules that force-rebuild the stamp file if any of its outputs are missing. Rebuilding the missing target therefore causes the stamp file to be rebuilt too. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* ninjatool: use constant names for stamp filesPaolo Bonzini2020-09-081-3/+5
| | | | | | | | | | | | | Numbering files according to rules causes confusion, because CUSTOM_COMMAND3.stamp from a previous build might represent completely different targets after Makefile.ninja is regenerated. As a result, the new targets are not rebuilt and compilation fails. Use the targets to build a SHA1 hash; the chances for collision are one in 2^24 even with a 12-character prefix of the hash. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* ninjatool: Fixes E$$: in generated Makefile.ninjaYonggang Luo2020-08-271-1/+1
| | | | | | | | | | | | | Even though SIMPLE_PATH_RE is used with re.match (which anchors the match implictly to the beginning of the string) it also needs an end-of-string anchor in order to match the full path token. Otherwise, the match would succeed incorrectly for $ and : characters contained in the path, for example if the path starts with C:/ or E:/. Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* ninjatool: quote dollars in variablesPaolo Bonzini2020-08-271-1/+2
| | | | | | | | Otherwise, dollars (such as in the special $ORIGIN rpath) are eaten by Make. Reported-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* configure: integrate Meson in the build systemPaolo Bonzini2020-08-211-0/+1002
The Meson build system is integrated in the existing configure/make steps by invoking Meson from the configure script and converting Meson's build.ninja rules to an included Makefile. build.ninja already provides tags/ctags/cscope rules, so they are removed. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>