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.html ...or, for a real-world example, the upvoted answer to: http://stackoverflow.com/questions/15368848/checking-environment-variable-in-make-through-automake ...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 [email protected] [email protected] [email protected] PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13
Description: Only build the Win32 executables if requested. Author: Peter Pentchev <[email protected]> Forwarded: not yet Last-Update: 2015-07-13 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,7 @@ AM_INIT_AUTOMAKE AC_DEFINE([_GNU_SOURCE], [1], [Use GNU source]) +AM_CONDITIONAL([AUTHOR_TESTS], [test -n "$AUTHOR_TESTS"]) AC_CANONICAL_HOST AC_SUBST([host]) AC_DEFINE_UNQUOTED([HOST], ["$host"], [Host description]) --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,12 +44,14 @@ # SSL library stunnel_LDFLAGS = -L$(SSLDIR)/lib64 -L$(SSLDIR)/lib -lssl -lcrypto +if AUTHOR_TESTS # Win32 executables # Just check if the programs can be built, don't perform any actual tests check_PROGRAMS = stunnel.exe tstunnel.exe stunnel_exe_SOURCES = $(common_headers) $(common_sources) $(win32_gui_sources) tstunnel_exe_SOURCES = $(common_headers) $(common_sources) $(win32_cli_sources) +endif # Remaining files to be included # EXTRA_PROGRAMS = stunnel.exe tstunnel.exe
signature.asc
Description: Digital signature
_______________________________________________ stunnel-users mailing list [email protected] https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users
