rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | ######################### |
| 2 | ## . variable part ## |
| 3 | ########################## |
| 4 | # script, tools, commands |
| 5 | |
| 6 | CAT = perl ./tools/init/cat.pl |
| 7 | CHK_OS = perl ./tools/init/chkOS.pl |
| 8 | CH_MOD = perl ./tools/init/chmod.pl |
| 9 | COPY_FILE = perl ./tools/init/copy_files.pl -f |
| 10 | COPY_DIR = perl ./tools/init/copy_files.pl -r |
| 11 | COMPARE = perl ./tools/init/compare.pl |
| 12 | DEL_FILE = perl ./tools/init/remove.pl -f |
| 13 | DEL_DIR = perl ./tools/init/rmdir.pl -f |
| 14 | ECHO = perl ./tools/init/echo.pl |
| 15 | GET_FNAME = perl ./tools/init/get_filename.pl |
| 16 | LIST_DIR = perl ./tools/init/dir.pl |
| 17 | MKDIR = perl ./tools/init/mkdir.pl |
| 18 | MOVE = perl ./tools/init/move.pl -f |
| 19 | RECURSIVE_DIR = perl ./tools/init/recursive_dir.pl |
| 20 | |
| 21 | GEN_TARGET_FILE = python ./tools/genTargetFile/genTargetFile.py True |
| 22 | |
| 23 | |
| 24 | CHK_TIME = perl ./tools/time.pl -n |
| 25 | CHDIR = cd |
| 26 | |
| 27 | # others |
| 28 | AND = && |
| 29 | |
| 30 | |
| 31 | OS_VERSION = $(shell perl ./tools/init/chkOS.pl) |
| 32 | ##################### |
| 33 | ## windows section ## |
| 34 | ##################### |
| 35 | ifeq ($(strip $(OS_VERSION)),MSWin32) |
| 36 | # script, tools, commands |
| 37 | LINKER = "./mtk_tools/guardian/Linker.exe" |
| 38 | SENDER = "./mtk_tools/guardian/Sender.exe" |
| 39 | STRCMPEX = .\tools\init\strcmpex_window.exe |
| 40 | MAKE = "./tools/make.exe" |
| 41 | GREP_V = find /V |
| 42 | |
| 43 | # if-else command |
| 44 | IF = if |
| 45 | IF_EXIST = if exist |
| 46 | IF_NOT = if not |
| 47 | IF_NOT_EXIST = if not exist |
| 48 | IF_ERR_TRUE = if ERRORLEVEL 1 |
| 49 | IF_ERR_FALSE = if not errorlevel 1 |
| 50 | THEN = |
| 51 | ELSE = else |
| 52 | CMD_END = |
| 53 | |
| 54 | # for loop command |
| 55 | FOR = for |
| 56 | F_OPT = /F usebackq |
| 57 | IN = in ( |
| 58 | DO = ) do |
| 59 | DONE = |
| 60 | |
| 61 | # condition |
| 62 | EQU = EQU |
| 63 | NEQ = NEQ |
| 64 | |
| 65 | # others |
| 66 | DEV_NUL = NUL |
| 67 | DECLARE_VAR = %% |
| 68 | PRE_VAR = %% |
| 69 | P_VAR = % |
| 70 | WITH = & |
| 71 | |
| 72 | else |
| 73 | ################### |
| 74 | ## Linux section ## |
| 75 | ################### |
| 76 | # script, tools |
| 77 | LINKER = ./mtk_tools/guardian/Linker |
| 78 | SENDER = ./mtk_tools/guardian/Sender |
| 79 | STRCMPEX = ./tools/init/strcmpex_linux.exe |
| 80 | MAKE = make |
| 81 | GREP_V = grep -v |
| 82 | |
| 83 | # if-else command |
| 84 | IF = if [ |
| 85 | IF_EXIST = if [ -e |
| 86 | IF_NOT = if [ ! |
| 87 | IF_NOT_EXIST = if [ ! -e |
| 88 | IF_ERR_TRUE = if [ $$? != 0 |
| 89 | IF_ERR_FALSE = if [ $$? == 0 |
| 90 | THEN = ]; then |
| 91 | ELSE = ;else |
| 92 | CMD_END = ;fi |
| 93 | |
| 94 | |
| 95 | # for loop command |
| 96 | FOR = for |
| 97 | F_OPT = |
| 98 | IN = in |
| 99 | DO = ;do |
| 100 | DONE = ;done |
| 101 | |
| 102 | # condition |
| 103 | EQU = = |
| 104 | NEQ = != |
| 105 | |
| 106 | # others |
| 107 | DEV_NUL = /dev/null |
| 108 | DECLARE_VAR = |
| 109 | PRE_VAR = $$ |
| 110 | P_VAR = $ |
| 111 | WITH = ; |
| 112 | |
| 113 | endif # OS_VERSION end |
| 114 | |