Blame guile/Makefile.am

Packit 549fdc
#  GnuTLS --- Guile bindings for GnuTLS.
Packit 549fdc
#  Copyright (C) 2007-2012, 2016 Free Software Foundation, Inc.
Packit 549fdc
#
Packit 549fdc
#  GnuTLS is free software; you can redistribute it and/or
Packit 549fdc
#  modify it under the terms of the GNU Lesser General Public
Packit 549fdc
#  License as published by the Free Software Foundation; either
Packit 549fdc
#  version 2.1 of the License, or (at your option) any later version.
Packit 549fdc
#
Packit 549fdc
#  GnuTLS is distributed in the hope that it will be useful,
Packit 549fdc
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 549fdc
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 549fdc
#  Lesser General Public License for more details.
Packit 549fdc
#
Packit 549fdc
#  You should have received a copy of the GNU Lesser General Public
Packit 549fdc
#  License along with GnuTLS; if not, write to the Free Software
Packit 549fdc
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit 549fdc
Packit 549fdc
# First of all, built the DSO.  We cannot compile the Scheme code until this
Packit 549fdc
# is done.
Packit 549fdc
SUBDIRS = src
Packit 549fdc
Packit 549fdc
Packit 549fdc
EXTRA_DIST = .dir-locals.el
Packit 549fdc
Packit 549fdc
guilemoduledir = $(GUILE_SITE)
Packit 549fdc
guilemodulesubdir = $(GUILE_SITE)/gnutls
Packit 549fdc
Packit 549fdc
nodist_guilemodule_DATA = modules/gnutls.scm
Packit 549fdc
dist_guilemodulesub_DATA = modules/gnutls/extra.scm
Packit 549fdc
Packit 549fdc
documentation_modules =				\
Packit 549fdc
  modules/system/documentation/README		\
Packit 549fdc
  modules/system/documentation/c-snarf.scm	\
Packit 549fdc
  modules/system/documentation/output.scm
Packit 549fdc
Packit 549fdc
helper_modules =				\
Packit 549fdc
  modules/gnutls/build/enums.scm		\
Packit 549fdc
  modules/gnutls/build/smobs.scm		\
Packit 549fdc
  modules/gnutls/build/utils.scm		\
Packit 549fdc
  modules/gnutls/build/tests.scm
Packit 549fdc
Packit 549fdc
EXTRA_DIST += modules/gnutls.in $(helper_modules) $(documentation_modules)
Packit 549fdc
Packit 549fdc
CLEANFILES = modules/gnutls.scm
Packit 549fdc
Packit 549fdc
.in.scm:
Packit 549fdc
	$(AM_V_GEN)$(MKDIR_P) "`dirname "$@"`" ; cat "$^" |		\
Packit 549fdc
	  $(SED) -e's|[@]guileextensiondir[@]|$(guileextensiondir)|g'	\
Packit 549fdc
	  > "$@.tmp"
Packit 549fdc
	$(AM_V_at)mv "$@.tmp" "$@"
Packit 549fdc
Packit 549fdc

Packit 549fdc
#
Packit 549fdc
# Scheme code compilation.
Packit 549fdc
#
Packit 549fdc
Packit 549fdc
if HAVE_GUILD
Packit 549fdc
Packit 549fdc
guileobjectsubdir = $(guileobjectdir)/gnutls
Packit 549fdc
nodist_guileobject_DATA = modules/gnutls.go
Packit 549fdc
nodist_guileobjectsub_DATA = modules/gnutls/extra.go
Packit 549fdc
Packit 549fdc
GOBJECTS =					\
Packit 549fdc
  $(nodist_guileobject_DATA)			\
Packit 549fdc
  $(nodist_guileobjectsub_DATA)
Packit 549fdc
Packit 549fdc
CLEANFILES += $(GOBJECTS)
Packit 549fdc
Packit 549fdc
AM_V_GUILEC = $(AM_V_GUILEC_$(V))
Packit 549fdc
AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
Packit 549fdc
AM_V_GUILEC_0 = @echo "  GUILEC  " $@;
Packit 549fdc
Packit 549fdc
# Make sure 'gnutls.scm' is built first.
Packit 549fdc
# Unset 'GUILE_LOAD_COMPILED_PATH' so we can be sure that any .go file that we
Packit 549fdc
# load comes from the build directory.
Packit 549fdc
# XXX: Use the C locale for when Guile lacks
Packit 549fdc
# <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
Packit 549fdc
%.go: %.scm modules/gnutls.scm
Packit 549fdc
	$(AM_V_GUILEC)$(MKDIR_P) "`dirname "$@"`" ;			\
Packit 549fdc
	$(AM_V_P) && out=1 || out=- ;					\
Packit 549fdc
	unset GUILE_LOAD_COMPILED_PATH ; LC_ALL=C			\
Packit 549fdc
	GNUTLS_GUILE_EXTENSION_DIR="$(abs_top_builddir)/guile/src"	\
Packit 549fdc
	$(GUILD) compile --target="$(host)"				\
Packit 549fdc
	  -L "$(top_builddir)/guile/modules"				\
Packit 549fdc
	  -L "$(top_srcdir)/guile/modules"				\
Packit 549fdc
	  -Wformat -Wunbound-variable -Warity-mismatch			\
Packit 549fdc
	  -o "$@" "$<" >&$$out
Packit 549fdc
Packit 549fdc
SUFFIXES = .go
Packit 549fdc
Packit 549fdc
endif HAVE_GUILD
Packit 549fdc
Packit 549fdc

Packit 549fdc
#
Packit 549fdc
# Tests.
Packit 549fdc
#
Packit 549fdc
Packit 549fdc
TESTS =						\
Packit 549fdc
  tests/anonymous-auth.scm			\
Packit 549fdc
  tests/session-record-port.scm			\
Packit 549fdc
  tests/pkcs-import-export.scm			\
Packit 549fdc
  tests/errors.scm				\
Packit 549fdc
  tests/x509-certificates.scm			\
Packit 549fdc
  tests/x509-auth.scm				\
Packit 549fdc
  tests/priorities.scm
Packit 549fdc
Packit 549fdc
if ENABLE_SRP
Packit 549fdc
TESTS +=					\
Packit 549fdc
  tests/srp-base64.scm
Packit 549fdc
endif
Packit 549fdc
Packit 549fdc
TESTS_ENVIRONMENT =				\
Packit 549fdc
  GUILE_AUTO_COMPILE=0				\
Packit 549fdc
  GUILE_WARN_DEPRECATED=detailed
Packit 549fdc
Packit 549fdc
LOG_COMPILER = $(top_builddir)/guile/pre-inst-guile -L $(srcdir)/tests
Packit 549fdc
Packit 549fdc
Packit 549fdc
EXTRA_DIST +=					\
Packit 549fdc
  $(TESTS)					\
Packit 549fdc
  tests/rsa-parameters.pem			\
Packit 549fdc
  tests/dh-parameters.pem			\
Packit 549fdc
  tests/x509-certificate.pem			\
Packit 549fdc
  tests/x509-key.pem