File: 1010-emscons-add-simple-help-menu-based-on-emconfigure.patch

package info (click to toggle)
emscripten 3.1.69%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 121,860 kB
  • sloc: ansic: 636,110; cpp: 425,974; javascript: 78,401; python: 58,404; sh: 49,154; pascal: 5,237; makefile: 3,366; asm: 2,415; lisp: 1,869
file content (32 lines) | stat: -rw-r--r-- 859 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Description: emscons: add simple help menu based on emconfigure
 The emscons command functions almost like emconfigure command.
 Therefore, it should provide similar help menu, but currently
 it has none.
Author: Khalid Masum <khalid.masum.92@gmail.com>
Last-Update: Thu, 20 Feb 2025 13:02:37 +0600
---
 emscons.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/emscons.py b/emscons.py
index dbff40c25..5e88dce55 100755
--- a/emscons.py
+++ b/emscons.py
@@ -13,6 +13,14 @@ import subprocess
 import sys
 from tools import building, utils

+def print_help():
+  print('emscons scons [FLAGS]', file=sys.stderr)
+
+
+if len(sys.argv) < 2 or sys.argv[1] in ('-h', '--help'):
+    print_help()
+    sys.exit(1)
+
 tool_path = utils.path_from_root('tools/scons/site_scons/site_tools/emscripten')
 building_env = building.get_building_env()

--
2.39.5