diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-31 11:20:09 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-31 11:20:09 +0100 |
commit | 4c0029711248f7d2fe947ee95efee9571ec0b719 (patch) | |
tree | 3185896ea69e41d35ee3e4c7846b9f62df72dd94 /tools/ac_converter.py | |
parent | 43a03aa95036ae4bdc7696438c8a5c083f5b81ee (diff) | |
download | meson-4c0029711248f7d2fe947ee95efee9571ec0b719.zip meson-4c0029711248f7d2fe947ee95efee9571ec0b719.tar.gz meson-4c0029711248f7d2fe947ee95efee9571ec0b719.tar.bz2 |
Improve ac_converter to print a help message.
Diffstat (limited to 'tools/ac_converter.py')
-rwxr-xr-x | tools/ac_converter.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/ac_converter.py b/tools/ac_converter.py index eda5097..739c42c 100755 --- a/tools/ac_converter.py +++ b/tools/ac_converter.py @@ -14,7 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""This script reads config.h.meson, looks for header +help_message = """Usage: %s <config.h.meson> + +This script reads config.h.meson, looks for header checks and writes the corresponding meson declaration. Copy config.h.in to config.h.meson, replace #undef @@ -364,6 +366,11 @@ function_data = \ headers = [] functions = [] sizes = [] + +if len(sys.argv) != 2: + print(help_message % sys.argv[0]) + sys.exit(0) + with open(sys.argv[1]) as f: for line in f: line = line.strip() |