Debian Codegraph @

bindings/jni/msvc/configure.bat

raw
1 @if "%ECHOON%" == "" (@echo off) else (@echo %ECHOON%)&:: set ECHOON=on if you want to debug this script
2 @::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
3 @:: THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY ::
4 @:: Read the zproject/README.md for information about making permanent changes. ::
5 @::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
6 @setlocal
7 :- configure.bat creates platform.h and configures the build process
8 :- You MUST run this before building via msbuild or VisualStudio.
9
10 IF %1.==--help. (
11 ECHO Syntax: configure [ switch ]
12 ECHO --help show this help
13 ECHO --enable-drafts from zip package, enables DRAFT API
14 ECHO --disable-drafts from git repository, disables DRAFT API
15 ECHO --without-zmakecert do not build zmakecert.exe
16 ECHO --without-zsp do not build zsp.exe
17 ECHO --without-test_randof do not build test_randof.exe
18 ECHO --without-czmq_selftest do not build czmq_selftest.exe
19 GOTO :eof
20 )
21 ECHO Configuring CZMQ...
22
23 :- make sure our directory is builds\msvc no matter where user is when executing it from
24 @pushd %~dp0%
25
26 ECHO // Generated by configure.bat> platform.h
27 ECHO. >> platform.h
28 ECHO #ifndef __PLATFORM_H_INCLUDED__>> platform.h
29 ECHO #define __PLATFORM_H_INCLUDED__>> platform.h
30 ECHO. >> platform.h
31 ECHO #define CZMQ_HAVE_WINDOWS 1>> platform.h
32
33 :- Check for dependencies
34 IF EXIST "..\..\..\libzmq" (
35 ECHO Building with libzmq
36 ECHO #define HAVE_LIBZMQ 1>> platform.h
37 ) ELSE (
38 ECHO Building without libzmq
39 ECHO CZMQ cannot build without libzmq
40 ECHO Please clone https://github.com/zeromq/libzmq.git, and then configure ^& build
41 ECHO TODO: resolve this problem automatically.
42 GOTO error
43 )
44 IF EXIST "..\..\..\uuid" (
45 ECHO Building with uuid
46 ECHO #define HAVE_UUID 1>> platform.h
47 ) ELSE (
48 ECHO Building without uuid
49 ECHO #undef HAVE_UUID>> platform.h
50 )
51 IF EXIST "..\..\..\systemd" (
52 ECHO Building with systemd
53 ECHO #define HAVE_SYSTEMD 1>> platform.h
54 ) ELSE (
55 ECHO Building without systemd
56 ECHO #undef HAVE_SYSTEMD>> platform.h
57 )
58 IF EXIST "..\..\..\lz4" (
59 ECHO Building with lz4
60 ECHO #define HAVE_LZ4 1>> platform.h
61 ) ELSE (
62 ECHO Building without lz4
63 ECHO #undef HAVE_LZ4>> platform.h
64 )
65 IF EXIST "..\..\..\libcurl" (
66 ECHO Building with libcurl
67 ECHO #define HAVE_LIBCURL 1>> platform.h
68 ) ELSE (
69 ECHO Building without libcurl
70 ECHO #undef HAVE_LIBCURL>> platform.h
71 )
72 IF EXIST "..\..\..\nss" (
73 ECHO Building with nss
74 ECHO #define HAVE_NSS 1>> platform.h
75 ) ELSE (
76 ECHO Building without nss
77 ECHO #undef HAVE_NSS>> platform.h
78 )
79 IF EXIST "..\..\..\libmicrohttpd" (
80 ECHO Building with libmicrohttpd
81 ECHO #define HAVE_LIBMICROHTTPD 1>> platform.h
82 ) ELSE (
83 ECHO Building without libmicrohttpd
84 ECHO #undef HAVE_LIBMICROHTTPD>> platform.h
85 )
86
87 :- Check if we want to build the draft API
88 if "%1" == "--enable-drafts" goto :with_draft
89 if "%1" == "--disable-drafts" goto :no_draft
90 IF NOT EXIST "..\..\.git" GOTO no_draft
91 :with_draft
92 ECHO Building with draft API (stable + legacy + draft API)
93 ECHO // Provide draft classes and methods>>platform.h
94 ECHO #define CZMQ_BUILD_DRAFT_API 1>>platform.h
95 GOTO end_draft
96 :no_draft
97 ECHO Building without draft API (stable + legacy API)
98 ECHO #undef CZMQ_BUILD_DRAFT_API 1>>platform.h
99 :end_draft
100 ECHO. >> platform.h
101 ECHO #endif>> platform.h
102 goto :done
103
104 :done
105 popd
106 @endlocal
107 :: this is how you code a return in a windows batch script... "goto :eof"
108 :: you see after a "call :label", %0 == ":label" inside :label, until "goto :eof" happens.
109 @if "%0:~1,1" == ":" @goto :eof
110 @exit /b 0
111
112 :error
113 call :done
114 @exit /b 1