Edit

kc3-lang/libressl/Makefile.am

Branch :

  • Browse

    Commit

  • Author : Pierre Wendling
    Date : 2023-08-06 15:07:31
    Hash : a89cd659
    Message : CMake: Export and install library targets. The configs can be consumed by setting LibreSSL_DIR to the build directory, or after installation using CMAKE_PREFIX_PATH/LibreSSL_DIR. For compatibility, the EXPORT_NAME of targets and the LIBRESSL_* variables are set to match the names used in FindLibreSSL.

  • Makefile.am
  • SUBDIRS = include crypto ssl tls apps man
    if ENABLE_TESTS
    SUBDIRS += tests
    endif
    ACLOCAL_AMFLAGS = -I m4
    
    pkgconfigdir = $(libdir)/pkgconfig
    pkgconfig_DATA = libtls.pc
    if !ENABLE_LIBTLS_ONLY
    pkgconfig_DATA += libcrypto.pc libssl.pc openssl.pc
    endif
    
    EXTRA_DIST = README.md README.windows VERSION config scripts
    EXTRA_DIST += CMakeLists.txt cmake_export_symbol.cmake cmake_uninstall.cmake.in FindLibreSSL.cmake LibreSSLConfig.cmake.in
    EXTRA_DIST += cert.pem openssl.cnf x509v3.cnf
    
    .PHONY: install_sw
    install_sw: install
    
    install-exec-hook:
    	@if [ "@OPENSSLDIR@x" != "x" ]; then \
    		OPENSSLDIR="$(DESTDIR)@OPENSSLDIR@"; \
    	else \
    		OPENSSLDIR="$(DESTDIR)$(sysconfdir)/ssl"; \
    	fi; \
    	mkdir -p "$$OPENSSLDIR/certs"; \
    	for i in cert.pem openssl.cnf x509v3.cnf; do \
    		if [ ! -f "$$OPENSSLDIR/$i" ]; then \
    			$(INSTALL) -m 644 "$(srcdir)/$$i" "$$OPENSSLDIR/$$i"; \
    		else \
    			echo " $$OPENSSLDIR/$$i already exists, install will not overwrite"; \
    		fi \
    	done
    
    uninstall-local:
    	@if [ "@OPENSSLDIR@x" != "x" ]; then \
    		OPENSSLDIR="$(DESTDIR)@OPENSSLDIR@"; \
    	else \
    		OPENSSLDIR="$(DESTDIR)$(sysconfdir)/ssl"; \
    	fi; \
    	for i in cert.pem openssl.cnf x509v3.cnf; do \
    		if cmp -s "$$OPENSSLDIR/$$i" "$(srcdir)/$$i"; then \
    			rm -f "$$OPENSSLDIR/$$i"; \
    		fi \
    	done