]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Add building man page on Windows
authorLev Stipakov <lev@openvpn.net>
Wed, 25 Aug 2021 16:47:52 +0000 (19:47 +0300)
committerGert Doering <gert@greenie.muc.de>
Sun, 12 Sep 2021 09:24:51 +0000 (11:24 +0200)
Use rst2html to build html from rst. Ignore errors,
this is not fatal and affects only MSI build.

Modify MSVC GitHub Actions to install python3/rst2html
and add html man page to artifacts.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Samuli Seppänen <samuli@openvpn.net>
Message-Id: <20210825164752.808-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22771.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
.github/workflows/build.yaml
build/msvc/msvc-generate/Makefile.mak

index fb231666f741de050efad61ab2b9e65daaaebcb6..f97b79ee8a0264dd19e5828ed741e4206b5b1a9e 100644 (file)
@@ -206,6 +206,14 @@ jobs:
       - name: Add MSBuild to PATH
         uses: microsoft/setup-msbuild@v1
 
+      - name: Set up Python
+        uses: actions/setup-python@v2
+        with:
+          python-version: '3.x'
+
+      - name: Install rst2html
+        run: python -m pip install --upgrade pip rst2html
+
       - name: Restore artifacts, or run vcpkg, build and cache artifacts
         uses: lukka/run-vcpkg@main
         with:
@@ -227,4 +235,5 @@ jobs:
           path: |
             ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.exe
             ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.dll
-            ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.pdb
\ No newline at end of file
+            ${{ matrix.plat }}-Output/${{env.BUILD_CONFIGURATION}}/*.pdb
+            doc/openvpn.8.html
index 59fc9f0ed333ca8756342b332d2077a03d94edf5..6da859e32fe134e528f5683296946454601e32ab 100644 (file)
@@ -11,7 +11,10 @@ OUTPUT_PLUGIN=$(SOURCEBASE)/include/openvpn-plugin.h
 INPUT_PLUGIN_CONFIG=version.m4.in
 OUTPUT_PLUGIN_CONFIG=version.m4
 
-all:   $(OUTPUT_MSVC_VER) $(OUTPUT_PLUGIN)
+INPUT_MAN=$(SOURCEBASE)/doc/openvpn.8.rst
+OUTPUT_MAN=$(SOURCEBASE)/doc/openvpn.8.html
+
+all:   $(OUTPUT_MSVC_VER) $(OUTPUT_PLUGIN) $(OUTPUT_MAN)
 
 $(OUTPUT_MSVC_VER): $(INPUT_MSVC_VER) $(CONFIG)
        cscript //nologo msvc-generate.js --config="$(CONFIG)" --input="$(INPUT_MSVC_VER)" --output="$(OUTPUT_MSVC_VER)"
@@ -22,7 +25,11 @@ $(OUTPUT_PLUGIN_CONFIG): $(INPUT_PLUGIN_CONFIG)
 $(OUTPUT_PLUGIN): $(INPUT_PLUGIN) $(OUTPUT_PLUGIN_CONFIG)
        cscript //nologo msvc-generate.js --config="$(OUTPUT_PLUGIN_CONFIG)" --input="$(INPUT_PLUGIN)" --output="$(OUTPUT_PLUGIN)"
 
+$(OUTPUT_MAN): $(INPUT_MAN)
+    -FOR /F %i IN ('where rst2html.py') DO python %i "$(INPUT_MAN)" "$(OUTPUT_MAN)"
+
 clean:
        -del "$(OUTPUT_MSVC_VER)"
        -del "$(OUTPUT_PLUGIN)"
        -del "$(OUTPUT_PLUGIN_CONFIG)"
+       -del "$(OUTPUT_MAN)"