diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-12-27 11:06:12 +0000 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-12-27 11:06:12 +0000 |
commit | e276bf1260045851b663612d4b49134ab5ec64a9 (patch) | |
tree | 8e35bf71b6d05d5e7c3abed316fdccbaa6fff886 | |
parent | ffba112d04908cd7badc7e7d39cb09bf6827ec7a (diff) | |
parent | b5297cdf97ef37a2b9bb41e428e00e718798f4dd (diff) | |
download | mm-common-e276bf1260045851b663612d4b49134ab5ec64a9.tar.gz |
Merge branch 'windows.prelim' into 'master'
Make libstdc++.tag retrieval work for Windows
See merge request GNOME/mm-common!3
-rw-r--r-- | meson.build | 7 | ||||
-rwxr-xr-x | util/meson_aux/libstdcxx-tag.py | 9 |
2 files changed, 9 insertions, 7 deletions
diff --git a/meson.build b/meson.build index 3255328..fbc7e5e 100644 --- a/meson.build +++ b/meson.build @@ -274,10 +274,11 @@ install_data('README', install_dir: install_docdir) download_cmd = 'none' if get_option('use-network') curl = find_program('curl', required: false) - download_cmd = 'curl' - if not curl.found() + if curl.found() + download_cmd = curl.path() + else wget = find_program('wget', required: true) - download_cmd = 'wget' + download_cmd = wget.path() endif endif diff --git a/util/meson_aux/libstdcxx-tag.py b/util/meson_aux/libstdcxx-tag.py index 2873498..6a66c22 100755 --- a/util/meson_aux/libstdcxx-tag.py +++ b/util/meson_aux/libstdcxx-tag.py @@ -22,7 +22,7 @@ libstdcxx_tag_url = 'http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/' + def curl(): cmd = [ - 'curl', + subcommand, '--compressed', '--connect-timeout', '300', '--globoff', @@ -43,7 +43,7 @@ def curl(): def wget(): cmd = [ - 'wget', + subcommand, '--timestamping', '--no-directories', '--timeout=300', @@ -70,8 +70,9 @@ def dont_download_tag_file(): return 0 # ----- Main ----- -if subcommand == 'curl': +subcommand_base = os.path.splitext(os.path.basename(os.path.normpath(subcommand)))[0] +if subcommand_base == 'curl': sys.exit(curl()) -if subcommand == 'wget': +if subcommand_base == 'wget': sys.exit(wget()) sys.exit(dont_download_tag_file()) |