"Fossies" - the Fresh Open Source Software Archive

Member "tidy-html5-5.8.0/build/cmake/build-me.bat" (16 Jul 2021, 4167 Bytes) of package /linux/www/tidy-html5-5.8.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) MS DOS Batch source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "build-me.bat": 5.7.28_vs_5.8.0.

    1 @setlocal
    2 
    3 @set TMPVER=1
    4 @set TMPPRJ=tidy
    5 @set TMPSRC=..\..
    6 @set TMPBGN=%TIME%
    7 @set TMPINS=D:\Projects\3rdParty
    8 @set TMPLOG=bldlog-1.txt
    9 @set DOPAUSE=1
   10 @set TMPGEN=Visual Studio 16 2019
   11 @set TMPBR=next
   12 @set TMPINDBG=0
   13 
   14 @set TMPOPTS=-G "%TMPGEN%" -A Win32
   15 @set TMPOPTS=%TMPOPTS% -DCMAKE_INSTALL_PREFIX=%TMPINS%
   16 @set TMPOPTS=%TMPOPTS% -DBUILD_SHARED_LIB=ON
   17 
   18 :RPT
   19 @if "%~1x" == "x" goto GOTCMD
   20 @if "%~1x" == "NOPAUSEx" (
   21     @set DOPAUSE=0
   22 ) else (
   23     @set TMPOPTS=%TMPOPTS% %1
   24 )
   25 @shift
   26 @goto RPT
   27 :GOTCMD
   28 
   29 @call chkmsvc %TMPPRJ%
   30 @if "%TMPBR%x" == "x" goto DNBR
   31 @call chkbranch %TMPBR%
   32 :DNBR
   33 
   34 @echo Build %TMPPRJ% 32-bits %DATE% %TIME%, in %CD%, to  %TMPLOG% > %TMPLOG%
   35 
   36 @if NOT EXIST %TMPSRC%\nul goto NOSRC
   37 
   38 @echo Build source %TMPSRC%... all output to build log %TMPLOG%
   39 @echo Build source %TMPSRC%... all output to build log %TMPLOG% >> %TMPLOG%
   40 
   41 @if EXIST build-cmake.bat (
   42 @call build-cmake >> %TMPLOG%
   43 )
   44 
   45 @if NOT EXIST %TMPSRC%\CMakeLists.txt goto NOCM
   46 
   47 @echo Doing: 'cmake %TMPSRC% %TMPOPTS%'
   48 @echo Doing: 'cmake %TMPSRC% %TMPOPTS%' >> %TMPLOG% 2>&1
   49 @cmake %TMPSRC% %TMPOPTS% >> %TMPLOG% 2>&1
   50 @if ERRORLEVEL 1 goto ERR1
   51 
   52 @echo Doing: 'cmake --build . --config Debug'
   53 @echo Doing: 'cmake --build . --config Debug'  >> %TMPLOG% 2>&1
   54 @cmake --build . --config Debug  >> %TMPLOG% 2>&1
   55 @if ERRORLEVEL 1 goto ERR2
   56 
   57 @echo Doing: 'cmake --build . --config Release'
   58 @echo Doing: 'cmake --build . --config Release'  >> %TMPLOG% 2>&1
   59 @cmake --build . --config Release  >> %TMPLOG% 2>&1
   60 @if ERRORLEVEL 1 goto ERR3
   61 
   62 @fa4 "***" %TMPLOG%
   63 @call elapsed %TMPBGN%
   64 @echo Appears a successful build... see %TMPLOG%
   65 @echo Note install location %TMPINS%
   66 @if "%TMPINDBG%x" == "1x" (
   67 @echo Will install Debug and Release
   68 ) else {
   69 @echo Will only intall Release
   70 )
   71 @echo.
   72 
   73 @REM ##############################################
   74 @REM Check if should continue with install
   75 @REM ##############################################
   76 @if "%DOPAUSE%x" == "0x" goto DOINST
   77 @choice /? >nul 2>&1
   78 @if ERRORLEVEL 1 goto NOCHOICE
   79 @choice /D N /T 10 /M "Pausing for 10 seconds. Def=N"
   80 @if ERRORLEVEL 2 goto GOTNO
   81 @goto DOINST
   82 :NOCHOICE
   83 @echo Appears OS does not have the 'choice' command!
   84 @ask *** CONTINUE with install? *** Only y continues
   85 @if ERRORLEVEL 2 goto NOASK
   86 @if ERRORLEVEL 1 goto DOINST
   87 @echo Skipping install to %TMPINST% at this time...
   88 @echo.
   89 @goto END
   90 :NOASK
   91 @echo 'ask' utility not found in path...
   92 @echo.
   93 @echo *** CONTINUE with install? *** Only Ctrl+c aborts...
   94 @echo.
   95 @pause
   96 
   97 :DOINST
   98 @echo Proceeding with INSTALL...
   99 @echo.
  100 @if NOT "%TMPINDBG%x" == "1x" goto DNDBGIN
  101 @echo Doing: 'cmake --build . --config Debug  --target INSTALL'
  102 @echo Doing: 'cmake --build . --config Debug  --target INSTALL' >> %TMPLOG% 2>&1
  103 @cmake --build . --config Debug  --target INSTALL >> %TMPLOG% 2>&1
  104 @if ERRORLEVEL 1 goto ERR4
  105 :DNDBGIN
  106 
  107 @echo Doing: 'cmake --build . --config Release  --target INSTALL'
  108 @echo Doing: 'cmake --build . --config Release  --target INSTALL' >> %TMPLOG% 2>&1
  109 @cmake --build . --config Release  --target INSTALL >> %TMPLOG% 2>&1
  110 @if ERRORLEVEL 1 goto ERR5
  111 
  112 @fa4 " -- " %TMPLOG%
  113 
  114 @call elapsed %TMPBGN%
  115 @echo All done... see %TMPLOG%
  116 
  117 @goto END
  118 
  119 :GOTNO
  120 @echo.
  121 @echo No install at this time, but there may be an updexe.bat to copy the EXE to c:\MDOS...
  122 @echo.
  123 @goto END
  124 
  125 :NOSRC
  126 @echo Can NOT locate source %TMPSRC%! *** FIX ME ***
  127 @echo Can NOT locate source %TMPSRC%! *** FIX ME *** >> %TMPLOG%
  128 @goto ISERR
  129 
  130 :NOCM
  131 @echo Can NOT locate %TMPSRC%\CMakeLists.txt!
  132 @echo Can NOT locate %TMPSRC%\CMakeLists.txt! >> %TMPLOG%
  133 @goto ISERR
  134 
  135 :ERR1
  136 @echo cmake configuration or generations ERROR
  137 @echo cmake configuration or generations ERROR >> %TMPLOG%
  138 @goto ISERR
  139 
  140 :ERR2
  141 @echo ERROR: Cmake build Debug FAILED!
  142 @echo ERROR: Cmake build Debug FAILED! >> %TMPLOG%
  143 @goto ISERR
  144 
  145 :ERR3
  146 @echo ERROR: Cmake build Release FAILED!
  147 @echo ERROR: Cmake build Release FAILED! >> %TMPLOG%
  148 @goto ISERR
  149 
  150 :ERR4
  151 @echo ERROR: Install Debug FAILED!
  152 @echo ERROR: Install Debug  FAILED! >> %TMPLOG%
  153 @goto ISERR
  154 
  155 :ERR5
  156 @echo ERROR: Install Release FAILED!
  157 @echo ERROR: Install Release  FAILED! >> %TMPLOG%
  158 @goto ISERR
  159 
  160 :ISERR
  161 @echo See %TMPLOG% for details...
  162 @endlocal
  163 @exit /b 1
  164 
  165 :END
  166 @endlocal
  167 @exit /b 0
  168 
  169 @REM eof