changeset 272:b094a03a8115

Add the missing script win32/update_gtags.cmd Issue327, fix cannot generate the CTAGS files issue on windows platform by add the missing script for plat/win32/update_gtags.cmd
author Liang Bo <5617279+microchip@user.noreply.gitee.com>
date Wed, 13 Jul 2022 08:56:24 +0800
parents 4e8e7047001f
children 8ddbcbfa57b2
files plat/win32/update_gtags.cmd
diffstat 1 files changed, 57 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plat/win32/update_gtags.cmd	Wed Jul 13 08:56:24 2022 +0800
@@ -0,0 +1,57 @@
+@echo off
+setlocal EnableExtensions EnableDelayedExpansion
+
+rem ==========================================
+rem            PARSE ARGUMENTS
+rem ==========================================
+
+set GTAGS_EXE=gtags
+set GTAGS_ARGS=%~4
+set INCREMENTAL=
+
+:ParseArgs
+if [%1]==[] goto :DoneParseArgs
+if [%1]==[-e] (
+    set GTAGS_EXE=%~2
+    shift
+    goto :LoopParseArgs
+)
+if [%1]==[--incremental] (
+    set INCREMENTAL=--incremental
+    shift
+    goto :LoopParseArgs
+)
+echo Invalid Argument: %1
+goto :Usage
+
+:LoopParseArgs
+shift
+goto :ParseArgs
+
+:DoneParseArgs
+
+
+rem ==========================================
+rem               GENERATE TAGS
+rem ==========================================
+
+echo Running gtags:
+echo call %GTAGS_EXE% %INCREMENTAL% %GTAGS_ARGS%
+call %GTAGS_EXE% %INCREMENTAL% %GTAGS_ARGS%
+echo Done.
+
+goto :EOF
+
+
+rem ==========================================
+rem                 USAGE
+rem ==========================================
+
+:Usage
+echo Usage:
+echo    %~n0 ^<options^>
+echo.
+echo    -e [exe=gtags]: The gtags executable to run.
+echo    -L [cmd=]:      The file list command to run
+echo.
+