File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11@ rem build_w32vc.bat
22@ echo off
3+ setlocal enabledelayedexpansion
34
5+ if not exist " %ProgramFiles(x86)% \Microsoft Visual Studio\Installer\vswhere.exe" goto no_vswhere
6+ for /f " usebackq tokens=*" %%i in (`" %ProgramFiles(x86)% \Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
7+ set InstallDir = %%i
8+ )
9+ if not exist " %InstallDir% \Common7\Tools\vsdevcmd.bat" goto no_vswhere
10+ call " %InstallDir% \Common7\Tools\vsdevcmd.bat" %*
11+ goto have_vc
12+
13+ :no_vswhere
414rem This file builds and tests CCCC under Microsoft Visual Studio.
515rem Path to Microsoft Visual Studio standard edition release 6.0
616set VCDIR = c:\Program Files\Microsoft Visual Studio\vc98
717if not exist " %VCDIR% \bin\vcvars32.bat" goto no_vc
818
919call " %VCDIR% \bin\vcvars32.bat"
20+ :have_vc
1021if not exist pccts\bin mkdir pccts\bin
1122
1223cd pccts\dlg
1324if exist *.obj del *.obj
14- nmake -f DlgMS.mak
25+ nmake -nologo - f DlgMS.mak
1526copy dlg.exe ..\bin
1627cd ..\..
1728
1829cd pccts\antlr
1930if exist *.obj del *.obj
20- nmake -f AntlrMS.mak
31+ nmake -nologo - f AntlrMS.mak
2132copy antlr.exe ..\bin
2233cd ..\..
2334
2435cd cccc
2536if exist *.obj del *.obj
2637if exist *.cpp del *.cpp
27- nmake -f w32vc.mak
38+ nmake -nologo - f w32vc.mak
2839cd ..
2940
3041cd test
31- nmake -f w32vc.mak
42+ nmake -nologo - f w32vc.mak
3243cd ..
3344
45+ rem vswhere is a vs2017+ thing, ancient vcaddin won't compile.
46+ if exist " %ProgramFiles(x86)% \Microsoft Visual Studio\Installer\vswhere.exe" goto end
3447cd vcaddin
35- nmake -f CcccDevStudioAddIn.mak CFG=" CcccDevStudioAddIn - Win32 Release"
48+ nmake -nologo - f CcccDevStudioAddIn.mak CFG=" CcccDevStudioAddIn - Win32 Release"
3649cd ..
3750
3851
@@ -45,9 +58,5 @@ echo Please modify the script if the location is different.
4558
4659
4760:end
48-
49-
50-
51-
52-
53-
61+ rem show "Press any key to continue" if build_w32vc.bat was run from exlorer
62+ IF %0 == " %~0 " pause
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ LDFLAGS_DEBUG=-Zi
1414PATHSEP =\\
1515CCC=cl.exe -nologo
1616LD =cl.exe -nologo
17- CFLAGS =-c -I$(PCCTS_H ) $(CFLAGS_DEBUG ) -GX -TP -DCCCC_CONF_W32VC
17+ CCC_OPTS =-c -I$(PCCTS_H ) $(CFLAGS_DEBUG ) -GX -TP -D_CRT_SECURE_NO_WARNINGS -DCCCC_CONF_W32VC
1818C_OFLAG =-Fo
1919LDFLAGS =$(LDFLAGS_DEBUG )
2020LD_OFLAG =-Fe
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ SET=$(PCCTS_HOME)\support\set
1010
1111
1212# Compiler stuff
13- CC = cl
13+ CC = cl -nologo
1414CFLAGS = -I "." -I "$(PCCTS_H ) " -I "$(SET ) " -D "USER_ZZSYN" -D "PC" \
15- -D "ZZLEXBUFSIZE=65536" /D "LONGFILENAMES" /W3
15+ -D "ZZLEXBUFSIZE=65536" -D_CRT_SECURE_NO_WARNINGS /D "LONGFILENAMES" /W3
1616
1717ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
1818 fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ SET=$(PCCTS_HOME)\support\set
99
1010
1111# Compiler stuff
12- CC = cl
12+ CC = cl -nologo
1313CFLAGS = -I "." -I "$(PCCTS_H ) " -I "$(SET ) " -D "USER_ZZSYN" -D "PC" \
14- -D "ZZLEXBUFSIZE=65536" /D "LONGFILENAMES" /W3
14+ -D "ZZLEXBUFSIZE=65536" -D_CRT_SECURE_NO_WARNINGS /D "LONGFILENAMES" /W3
1515
1616DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
1717 output.obj relabel.obj automata.obj
You can’t perform that action at this time.
0 commit comments