From 4c0029711248f7d2fe947ee95efee9571ec0b719 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 31 Jul 2017 11:20:09 +0100 Subject: Improve ac_converter to print a help message. --- tools/ac_converter.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 + +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() -- cgit v1.1