diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2019-12-20 16:13:55 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2019-12-20 16:13:55 +0800 |
commit | b5297cdf97ef37a2b9bb41e428e00e718798f4dd (patch) | |
tree | 8e35bf71b6d05d5e7c3abed316fdccbaa6fff886 /util | |
parent | ffba112d04908cd7badc7e7d39cb09bf6827ec7a (diff) | |
download | mm-common-b5297cdf97ef37a2b9bb41e428e00e718798f4dd.tar.gz |
Make libstdc++.tag retrieval work for Windows
With this, the mm-common package will now build for Windows/MSVC; it
is still a long way to go to actually make it usable for Windows
This ensures that we use the curl.exe and wget.exe that we happen to
find, and the corresponding DLLs of the libraries can be loaded.
Diffstat (limited to 'util')
-rwxr-xr-x | util/meson_aux/libstdcxx-tag.py | 9 |
1 files changed, 5 insertions, 4 deletions
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()) |