"make check" tries to build Windows binary on Unix

Hi, I just tries to build stunnel 5.20 on Solaris 10 Sparc and noticed a strange behaviour during „make check“ which yields in a try to build Windows executables:
dam@unstable10s [unstable10s]:/home/dam/mgar/pkg/stunnel/trunk/work/solaris10-sparc/build-isa-sparcv8plus/stunnel-5.20 > gmake check Making check in src gmake[1]: Entering directory '/home/dam/mgar/pkg/stunnel/trunk/work/solaris10-sparc/build-isa-sparcv8plus/stunnel-5.20/src' gmake stunnel.exe tstunnel.exe gmake[2]: Entering directory '/home/dam/mgar/pkg/stunnel/trunk/work/solaris10-sparc/build-isa-sparcv8plus/stunnel-5.20/src' i686-w64-mingw32-gcc -c -I/usr/src/openssl-1.0.2d-i686/include -mthreads -fstack-protector -O2 -Wall -Wextra -Wpedantic -Wformat=2 -Wconversion -Wno-long-long -D_FORTIFY_SOURCE=2 -DUNICODE -D_UNICODE -o tls.obj tls.c /bin/bash: i686-w64-mingw32-gcc: command not found Makefile:1206: recipe for target 'tls.obj' failed gmake[2]: *** [tls.obj] Error 127 gmake[2]: Leaving directory '/home/dam/mgar/pkg/stunnel/trunk/work/solaris10-sparc/build-isa-sparcv8plus/stunnel-5.20/src' Makefile:1054: recipe for target 'check-am' failed
I think this comes from these lines in src/Makefile.am:
# Just check if the programs can be built, don't perform any actual tests check_PROGRAMS = stunnel.exe tstunnel.exe
Essentially the „check“ phase could just not be called during build, but it would be cleaner to not bail out on Unix. Best regards — Dago -- "You don't become great by trying to be great, you become great by wanting to do something, and then doing it so hard that you become great in the process." - xkcd #896

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12.07.2015 21:24, Dagobert Michelsen wrote:
# Just check if the programs can be built, don't perform any actual tests check_PROGRAMS = stunnel.exe tstunnel.exe
Essentially the „check“ phase could just not be called during build, but it would be cleaner to not bail out on Unix.
I agree that testing whether the windows binaries can be correctly cross-compiled is probably only useful to me. On the other hand this check allows to easily test (with "make distcheck") whether the distributed sources are sufficient for building Windows targets. Mike -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVo2jLAAoJEC78f/DUFuAUb/cQANUDiD593wibJnMvqUQV9TJQ hURdxDmXervEVzHzWM/wXA5xRLInsOwcD667zSkrMTVfznilvZs1QsZFL4vLbaIU CLbEDOX1pfU6UfaKmKIkgWn2WPR2gfUIXWrQhEQ02QhiBiSqq8RXIvF7r/TJ1niy YblE3fRUviCMJTdTnXiOgQBwFVJ6KShg6tyNoM7646pcc0LwhUKTxUXHEsojNiFz /XqZa9wfBOkwh4Pw1fID3Utzs6YWKl66dhwqz83I8nUfgBX+fzp3SlnrZNt1pL6K z2eQ1xmSk/bKsfmqGwWEbxO5gpIjm7RXmZzDDdub6SwoXgs4u0RlQvo9HPJiM4b5 wjqz7RThFEr0fWo7Otl7icxQYCQ2lmNfQq7ISVi2MufpLNJypvqLRbga06EzF9R3 ZuP4AH0mbUZmhQdWoJf/K5zTwlKNJl/5HqZ6jg/6iSIACcGrjnYMr5quRY1mCYxq E7LZvh6yHBFFFA5aoHl44BX+ZdJ4XqVYfBU2O16KsxjtbRLPMIJJ1K6hjQXsXZt7 nPLyW3DWzrwupSSKF40tfL/rFWsoy6vonU/lVEshW7s0WjU5QXvm0LEKL+B41uk4 NPSvoqLUcZzIXgQKITB7rNtawGVZgaArbfE/5LacmgzxV6Ah4hTqzq7ACRiYcpQE 2JlNhtosRUbolZjGtT04 =6X5W -----END PGP SIGNATURE-----

On Mon, Jul 13, 2015 at 09:29:19AM +0200, Michal Trojnara wrote:
On 12.07.2015 21:24, Dagobert Michelsen wrote:
# Just check if the programs can be built, don't perform any actual tests check_PROGRAMS = stunnel.exe tstunnel.exe
Essentially the „check“ phase could just not be called during build, but it would be cleaner to not bail out on Unix.
I agree that testing whether the windows binaries can be correctly cross-compiled is probably only useful to me. On the other hand this check allows to easily test (with "make distcheck") whether the distributed sources are sufficient for building Windows targets.
Maybe wrap them in an AM_CONDITIONAL for an AUTHOR_TESTS or RELEASE_TESTS environment variable or something like this, like the Perl folks do? G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@FreeBSD.org p.penchev@storpool.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 13.07.2015 10:10, Peter Pentchev wrote:
Maybe wrap them in an AM_CONDITIONAL for an AUTHOR_TESTS or RELEASE_TESTS environment variable or something like this, like the Perl folks do?
I guess these are good ideas. I'd appreciate some documentation and/or sample code pointers. Mike -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVo5xVAAoJEC78f/DUFuAUO10QAKw0DdwflExmgySQmIUg71IP MkC7IVyxxQkNy/TFnCmhiTjGUpKikJapd2PKj+1QyAaifSdSdIFqkxJ7KRAS/DqH NF4qWsOE987G0b194jsasSoHkoBpHJiXX0qZHOyGcHm2/jN/JplJkeI5UJuezaJY YwpP3jkxE7EPiY1BqTMFBay3XQhkt4DrnLCmqYRBfLBiEM0A+7R34w22W2mmTVUj ykHMJaGzOocW/SDXNiZLgFNZpWY9XdldOs4PZbkWGVceYLABkH74NHHX1hzQCyYz aYcR3XE6kiG8vPFIaPHoGL6PCFsY4JRS9OC7dzjFi8K0yOn9TPn+NB0Q3V0F88eH EUl3k8xvF8HBT1gz3pgeVE3hMLi51geh7MW7WXsGDLyzIvtR2MHlCNO11Ne4Q4FV acq4mzjapJoV/pmbI14MQR9KJYeA12MzGmUbOENP7LlXZmuD9XF9gdiaDGtgtyEv FW+AzAbnwxY/6Ak8lfmeq7JBB46wNXSiDsy1NB+CPv+jMdqcn+2Esgv/KsEbXu5L PGNpO0U7fzM74fhhP/7lyMnxHVfQEQafUfOkBcoilSDd/Ha/JFr32aeIZmNvIGaa JuhM/dCKFEdaAqTsfUCA5ZkAey9S6+DktbCiVArN7mudg7LQndR/O/h/tpdn/rVv o4U5IIzBnO3EaQTmVkTU =mIWW -----END PGP SIGNATURE-----

On Mon, Jul 13, 2015 at 01:09:09PM +0200, Michal Trojnara wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 13.07.2015 10:10, Peter Pentchev wrote:
Maybe wrap them in an AM_CONDITIONAL for an AUTHOR_TESTS or RELEASE_TESTS environment variable or something like this, like the Perl folks do?
I guess these are good ideas. I'd appreciate some documentation and/or sample code pointers.
Okay, what do you think about the attached patch? For some documentation, see: http://www.gnu.org/software/automake/manual/html_node/Usage-of-Conditionals.... ...or, for a real-world example, the upvoted answer to: http://stackoverflow.com/questions/15368848/checking-environment-variable-in... ...or the contrib/minizip source in zlib: https://github.com/madler/zlib/blob/master/contrib/minizip/configure.ac https://github.com/madler/zlib/blob/master/contrib/minizip/Makefile.am Of course, it's up to you whether to do it this way or in the somewhat more traditional --with/--enable-something style. G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@FreeBSD.org p.penchev@storpool.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 13.07.2015 14:53, Peter Pentchev wrote:
Okay, what do you think about the attached patch?
It's quite neat. I'd prefer something that would automagically detect that it's me doing the 'make check' and not other people who just downloaded the tarball. What do you thin about the attached one? Mike -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVo7o9AAoJEC78f/DUFuAUs04QAJ09XC4OONSCVOIXs0uHHmxh +lsr/WC8N+RlKcnHVu7fQLDu0vHRZJHpDr61YFzliWnSswLQ0pqIFR28Qz0jw3j7 5MhrQB2B1aFM23QUKPOW4RmjhqbpyzbhQzoHWPplfFrJmG5fQMFqGgaAiZtfKcta upJm+NS9Mr/7yqsFPRlZkcrHXyIlgzIM6o9b83OMH5Tk3TlyXCXaf1KFSDpJw6iI 6IMvD2M7Nf26x8tXdKy62a6DlUGA3CqplatZIBzg+Teq7nrYcDHgsOaOX+eG4123 HK4gpvqWGfHYMaEdX7W1AXHb4pK3t6R5kG6KdKVDtghmBBaO4w8XX7uGmDk2ZzrH puOZJv8iA5YuPc2J7aPY/5jLqO/Ql+SKh9uGj7oY0reSWUyqYKTaUvTSDB2vxzd8 qKhLMNaxBnTA+B93bCEBV95XAaIQ+9sTwbLkD7a97M21SJtwf3lnnqDeAAsXsaa/ sNwaNnAIxrjo28fRavd53qTtVcdRXpKbL+D4j+30PJ1YX7vKoHyekDj915dCQFru CgjwfYz7+BIlo1G3raDoTNy9ApzAL+8Mq3+gygb5AIcoNfcjW9YFQaRZLOIpFqq+ YtUtfbwpZqfYGY8C24UDTeLiIExm5aMJg5LfiHKXOdP2gJ2jOHJlIpC+HIO4yaOy Qa2TI53sdOEaV9ly/7+1 =E5pQ -----END PGP SIGNATURE-----

On Mon, Jul 13, 2015 at 03:16:45PM +0200, Michal Trojnara wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 13.07.2015 14:53, Peter Pentchev wrote:
Okay, what do you think about the attached patch?
It's quite neat. I'd prefer something that would automagically detect that it's me doing the 'make check' and not other people who just downloaded the tarball. What do you thin about the attached one? [snip]
+AM_CONDITIONAL([AUTHOR_TESTS], [test -d ".git"])
Uhm, this might prove problematic for the maintainers of stunnel packages for various OS's, who might want to keep their own work in a Git repository... like I do :) G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@FreeBSD.org p.penchev@storpool.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13
participants (3)
-
Dagobert Michelsen
-
Michal Trojnara
-
Peter Pentchev