wolfSSL / wolfTPM

wolfTPM is a highly portable TPM 2.0 library, designed for embedded use.
https://www.wolfssl.com
GNU General Public License v2.0
230 stars 55 forks source link

fix autogen.sh for WSL/Windows git hook file link attempt #352

Closed gojimmypi closed 1 month ago

gojimmypi commented 1 month ago

Similar to https://github.com/wolfSSL/wolfssl/pull/6798 this PR addresses https://github.com/wolfSSL/wolfTPM/issues/346 for wolfTPM.

The autogen.sh is updated to check for WSL/Windows, and if detected, does not attempt to link git hook files. When running in WSL for a Windows drive, (e.g. /mnt/c/) new warning messages will appear regarding not attempting to link the pre-commit files which otherwise don't actually get linked. Rather, a zero length file is created, causing an Visual Studio.

gojimmypi:/mnt/c/workspace/wolfTPM-gojimmypi-pr
$ ./autogen.sh
Linux ln does not work on shared Windows file system in WSL.
The pre-commit.sh file will not be copied to .git/hooks/pre-commit
The pre-push.sh file will not be copied to .git/hooks/pre-commit
Making missing build-aux directory.
Touching missing build-aux/config.rpath file.
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
[... snip / etc ...]

This PR addresses https://github.com/wolfSSL/wolfTPM/issues/346