]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
CMake: various small non-functional improvements
authorFrank Lichtenheld <frank@lichtenheld.com>
Tue, 19 Sep 2023 15:56:35 +0000 (17:56 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 21 Sep 2023 20:43:54 +0000 (22:43 +0200)
These are based on review comments for the 2.6 backport.
But since they apply to the original master implementation
as well, I address them in this separate patch.

- Add documentation to contrib/cmake/*.py
- Fix grammar in README.cmake.md
- Update a TODO in CMakeLists.txt to better reflect
  the status quo
- Fix indentation in unit_tests' Makefile.am

Change-Id: I4e16767ee221e1aefdd18d13b3411c27d8dd844a
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/342
Message-Id: <20230919155635.708557-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27043.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
CMakeLists.txt
README.cmake.md
contrib/cmake/git-version.py
contrib/cmake/parse-version.m4.py
tests/unit_tests/openvpn/Makefile.am

index 9de6abab5cfbfd8921892e38b3971a39f9c54b9b..454ef62d4d380ab18b3965cbca62f6a8c09483dc 100644 (file)
@@ -292,7 +292,7 @@ set(HAVE_CONFIG_VERSION_H YES)
 
 configure_file(config.h.cmake.in config.h)
 configure_file(include/openvpn-plugin.h.in openvpn-plugin.h)
-# TODO remove later when msvc-config.h is removed and we can always include config.h
+# TODO we should remove the need for this, and always include config.h
 add_definitions(-DHAVE_CONFIG_H)
 
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
index 599d8dc1641afc9497775ac6cb63c9791abdae66..d181b64cd9d462f9deb093cce8dac8e037b15dcc 100644 (file)
@@ -24,7 +24,7 @@ MSVC builds
 -----------
 
 The following tools are expected to be present on the system, you
-can them install with a package manager of your choice (e.g.
+can install them with a package manager of your choice (e.g.
 chocolatey, winget) or manually:
 
 * CMake
index c2b445272c46e2b36c79c58a7f2d2fcfab54aab5..4f78ac42bf29b789c7268d3cb6eb173311f44c49 100644 (file)
 #  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+# Usage: ./git-version.py [directory]
+# Find a good textual representation of the git commit currently checked out.
+# Make that representation available as CONFIGURE_GIT_REVISION in
+# <directory>/config-version.h.
+# It will prefer a tag name if it is checked out exactly, otherwise will use
+# the branch name. 'none' if no branch is checked out (detached HEAD).
+# This is used to enhance the output of openvpn --version with Git information.
+
 import os
 import sys
 import subprocess
index d5ff2bdb30af5103d1302175963b73236a0e156d..3dfb31fbf8c3498f4315cd09331719f8dca74dcb 100644 (file)
 #  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #
 
+# Usage: ./parse-version.m4.py m4file [directory]
+# Read <m4file>, extract all lines looking like M4 define(), and translate
+# them into CMake style set(). Those are then written out to file
+# <directory>/version.cmake.
+# Intended to be used on top-level version.m4 file.
+
 import os
 import re
 import sys
index 6b56f8480244aa07152934dd30ccaa7dd6a56388..ef45b117aae39e51ee7baa6547fdca4c88f33e77 100644 (file)
@@ -110,7 +110,7 @@ tls_crypt_testdriver_LDFLAGS = @TEST_LDFLAGS@ \
        -Wl,--wrap=parse_line \
        -Wl,--wrap=rand_bytes
 tls_crypt_testdriver_SOURCES = test_tls_crypt.c mock_msg.c mock_msg.h \
-    mock_win32_execve.c \
+       mock_win32_execve.c \
        $(top_srcdir)/src/openvpn/argv.c \
        $(top_srcdir)/src/openvpn/base64.c \
        $(top_srcdir)/src/openvpn/buffer.c \