diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-02-08 22:17:17 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-02-08 22:17:17 +0200 |
commit | cd9b9f8ec5e7b9497396398df9909d18b9aad967 (patch) | |
tree | 929ca394ea9a85802519b9f5be6d2f6435a7c6c4 /builder_install.py | |
parent | cd9b636fe14de75b9fb9f62e675a7ecc879071af (diff) | |
download | meson-cd9b9f8ec5e7b9497396398df9909d18b9aad967.zip meson-cd9b9f8ec5e7b9497396398df9909d18b9aad967.tar.gz meson-cd9b9f8ec5e7b9497396398df9909d18b9aad967.tar.bz2 |
Can install man files with Ninja.
Diffstat (limited to 'builder_install.py')
-rwxr-xr-x | builder_install.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/builder_install.py b/builder_install.py index 2fbc91d..8731443 100755 --- a/builder_install.py +++ b/builder_install.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import sys, pickle, os, shutil, subprocess +import sys, pickle, os, shutil, subprocess, gzip class InstallData(): def __init__(self, depfixer, dep_prefix): @@ -22,12 +22,24 @@ class InstallData(): self.depfixer = depfixer self.dep_prefix = dep_prefix self.headers = [] + self.man = [] def do_install(datafilename): ifile = open(datafilename, 'rb') d = pickle.load(ifile) install_targets(d) install_headers(d) + install_man(d) + +def install_man(d): + for m in d.man: + fullfilename = m[0] + outfilename = m[1] + outdir = os.path.split(outfilename)[0] + os.makedirs(outdir, exist_ok=True) + print('Installing %s to %s.' % (fullfilename, outdir)) + gzip.open(outfilename, 'w').write(open(fullfilename, 'rb').read()) + def install_headers(d): for t in d.headers: |