OSDN Git Service

V208 corrected for line display with NOECHO
[fast-forth/master.git] / config / msp430 / Preprocess.bat
1 ::Preprocess.bat
2 ::used by PreprocessSourceFile.bat or by scite editor Tools menu
3
4 @ECHO OFF
5
6 ::echo %2
7 ::echo %~d1\config\gema\%~n2.pat
8
9 IF "%2" == "" ( 
10 echo no file to be preprocessed!
11 goto badend 
12 )
13
14 IF NOT EXIST %~dpn1.f (
15 echo %~dpn1.f not found!
16 goto badend 
17 )
18
19 IF NOT EXIST %~d1\config\gema\%~n2.pat (
20 echo %~d1\config\gema\%~n2.pat not found!
21 goto badend 
22 )
23
24 IF "%3" == "" GOTO preprocess
25
26 echo unexpected third parameter!
27
28 :badend
29 pause > nul
30 exit
31
32
33 :preprocess
34 ::%~d1\prog\gema\gema.exe -nobackup -line -t '\n=\r\n;\r\n=\r\n' -f %~d1\config\gema\%~n2.pat %1 %~dp1last.4th
35 ::%~d1\prog\gema\gema.exe -nobackup -line -t '-\r\n=\r\n' -f %~d1\config\gema\%~n2.pat %1 %~dp1last.4th
36 %~d1\prog\gema\gema.exe -nobackup -line -t -f %~d1\config\gema\%~n2.pat %1 %~dp1last.4th
37 exit
38
39 :: %~dpn1.f is the symbolic source file
40 :: %~d1\config\gema\%~n2.pat is the pattern file for preprocessor gema.exe
41 :: %~dpn1.4th is the output source file (ready to send to the target)
42 :: %~d1 is the drive of arg %1
43 :: %~n2 is your selected template by SelectTarget.bat or your scite $(1)
44
45 rem your git copy must be the root of a virtual drive
46