Makefile revision 6302
cd348e325366620fe047edcc849e3c9424828599Peter Bray#
cd348e325366620fe047edcc849e3c9424828599Peter Bray# CDDL HEADER START
0ca9a2c194523c517c3aafe5758e217ac88d6baaLubos Kosco#
cd348e325366620fe047edcc849e3c9424828599Peter Bray# The contents of this file are subject to the terms of the
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# Common Development and Distribution License (the "License").
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# You may not use this file except in compliance with the License.
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal#
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# or http://www.opensolaris.org/os/licensing.
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# See the License for the specific language governing permissions
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# and limitations under the License.
2b024356b830395446c55f50f9f724a63612e578Lubos Kosco#
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# When distributing Covered Code, include this CDDL HEADER in each
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# If applicable, add the following below this CDDL HEADER, with the
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# fields enclosed by brackets "[]" replaced with your own identifying
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# information: Portions Copyright [yyyy] [name of copyright owner]
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray#
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# CDDL HEADER END
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray#
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray#
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
d961aa46ea0d50fed47802497e45226b1965b12dVladimir Kotal#
d961aa46ea0d50fed47802497e45226b1965b12dVladimir KotalBUILD_BITS= 64
d961aa46ea0d50fed47802497e45226b1965b12dVladimir KotalCOMPILER= gcc
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Brayinclude ../../make-rules/shared-macros.mk
cd71fb134e037849c77364b50940b1870c4684ceVladimir Kotal
cd71fb134e037849c77364b50940b1870c4684ceVladimir KotalCOMPONENT_NAME= rsyslog
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayCOMPONENT_VERSION= 8.15.0
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayCOMPONENT_PROJECT_URL= http://www.rsyslog.com/
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayCOMPONENT_ARCHIVE_HASH= sha256:9ed6615a8503964290471e98ed363f3975b964a34c2d4610fb815a432aadaf59
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)files/download/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayCOMPONENT_BUGDB= service/rsyslog
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir KotalTPNO= 28284
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# The documentation is in a separate download
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir KotalCOMPONENT_SRC_DOC= $(COMPONENT_NAME)-doc-$(COMPONENT_VERSION)
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir KotalCOMPONENT_ARCHIVE_DOC= $(COMPONENT_SRC_DOC).tar.gz
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir KotalCOMPONENT_ARCHIVE_HASH_DOC= sha256:3462402165a3ff34ceff23db20382a14bd3727131994f140a004f4872a01c12a
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir KotalCOMPONENT_ARCHIVE_URL_DOC= $(COMPONENT_PROJECT_URL)files/download/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE_DOC)
b17cb0705d90907337b3528aa7b8ed1700806f26Vladimir Kotal
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir KotalUNPACK_ARGS_DOC= -r $(COMPONENT_SRC_DOC)
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal# There are tests, but gmake test is currently broken.
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal# It was working in the previous version, but not sure why
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal# it breaks now. Leaving it at no tests for now.
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir KotalTEST_TARGET= $(NO_TESTS)
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotalinclude $(WS_MAKE_RULES)/common.mk
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal# Automake fix, regenerates configure file to get rid of the
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal# automake 'probably too old' error. This fixes gmake test
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal# needing more than one try to run. This does not fix the
3ba66fbb56ef22f183da783a1b2718280c357a4eStanislav Kozina# fact that gmake test runs no tests.
3ba66fbb56ef22f183da783a1b2718280c357a4eStanislav KozinaCOMPONENT_PRE_CONFIGURE_ACTION= cd $(SOURCE_DIR); \
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal aclocal; \
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal autoconf; \
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray automake -a;
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# gmake test will generate different outputs if run multiple
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# times. This gets rid of all the unimportant output
0ca9a2c194523c517c3aafe5758e217ac88d6baaLubos KoscoCOMPONENT_TEST_TRANSFORMS += '-e "/\(CC\).*/d" '
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir KotalCOMPONENT_TEST_TRANSFORMS += '-e "/\(make\).*/d" '
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir KotalCOMPONENT_TEST_TRANSFORMS += '-e "/\(source\).*/d" '
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir KotalCOMPONENT_TEST_TRANSFORMS += '-e "/\(check\).*/d" '
cd348e325366620fe047edcc849e3c9424828599Peter BrayCOMPONENT_TEST_TRANSFORMS += '-e "/\(usr\).*/d" '
3b0448fdd830b8d04c6a71511e5d26a4fc3b5b80Lubos KoscoCOMPONENT_TEST_TRANSFORMS += '-e "/\(SOURCE_DIR\).*/d" '
cd348e325366620fe047edcc849e3c9424828599Peter Bray
cd348e325366620fe047edcc849e3c9424828599Peter Bray# This is needed for things to be built correctly.
cd348e325366620fe047edcc849e3c9424828599Peter BrayCFLAGS += -std=c99
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal# A normal 64-bit build would result in /usr/lib/$(MACH64)/rsyslog but since we
43dac746513591adbd09bc4f417feb385f4fd87eVladimir Kotal# have a self-contained eco-system, simplify things for customers and just use
fbf97ea1786d1e25add88bbfb91810170473bc9fLubos Kosco# /usr/lib/rsyslog .
fbf97ea1786d1e25add88bbfb91810170473bc9fLubos KoscoCONFIGURE_LIBDIR.64 = $(CONFIGURE_LIBDIR.32)
fbf97ea1786d1e25add88bbfb91810170473bc9fLubos Kosco
fbf97ea1786d1e25add88bbfb91810170473bc9fLubos Kosco# Rsyslog sources contain __FILE__ macros which contain full path to the workspace
fbf97ea1786d1e25add88bbfb91810170473bc9fLubos Kosco# This may appear in debug output which is not nice. By specifying the source
fbf97ea1786d1e25add88bbfb91810170473bc9fLubos Kosco# path relative we force the macro to be relative path too.
fbf97ea1786d1e25add88bbfb91810170473bc9fLubos KoscoCONFIGURE_OPTIONS += --srcdir=../../$(COMPONENT_NAME)-$(COMPONENT_VERSION)
fbf97ea1786d1e25add88bbfb91810170473bc9fLubos KoscoCONFIGURE_OPTIONS += --enable-imsolaris
f21b682cd9b414738a4f5a38b56f6682e537e1d2Trond NorbyeCONFIGURE_OPTIONS += --enable-mail
3b0448fdd830b8d04c6a71511e5d26a4fc3b5b80Lubos KoscoCONFIGURE_OPTIONS += --enable-gssapi_krb5
3b0448fdd830b8d04c6a71511e5d26a4fc3b5b80Lubos KoscoCONFIGURE_OPTIONS += --enable-gnutls
cd348e325366620fe047edcc849e3c9424828599Peter BrayCONFIGURE_OPTIONS += --disable-klog
cd348e325366620fe047edcc849e3c9424828599Peter BrayCONFIGURE_OPTIONS += --sbindir=$(USRLIBDIR)/rsyslog
cd348e325366620fe047edcc849e3c9424828599Peter Bray
cd348e325366620fe047edcc849e3c9424828599Peter Bray# libgcrypt is not approved.
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayCONFIGURE_OPTIONS += --disable-libgcrypt
cd348e325366620fe047edcc849e3c9424828599Peter BrayCONFIGURE_OPTIONS += --enable-extended-tests
2cf31ec93bd5d8a2efeab511ce051da51e69aedaLubos Kosco
2cf31ec93bd5d8a2efeab511ce051da51e69aedaLubos Kosco# There are man pages in the tarball, which will require modification for
43dac746513591adbd09bc4f417feb385f4fd87eVladimir Kotal# content. Also, building them from here requires python-docutils.
43dac746513591adbd09bc4f417feb385f4fd87eVladimir KotalCONFIGURE_OPTIONS += --disable-generate-man-pages
2cf31ec93bd5d8a2efeab511ce051da51e69aedaLubos Kosco
43dac746513591adbd09bc4f417feb385f4fd87eVladimir Kotal# Make the build verbose, show executed commands
43dac746513591adbd09bc4f417feb385f4fd87eVladimir KotalCOMPONENT_BUILD_ARGS += AM_DEFAULT_VERBOSITY=1
2cf31ec93bd5d8a2efeab511ce051da51e69aedaLubos Kosco
0ca9a2c194523c517c3aafe5758e217ac88d6baaLubos Kosco# common targets
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter BrayPROTODOCDIR= $(PROTOUSRSHAREDOCDIR)/$(COMPONENT_NAME)
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray# Docs to install are the tree under docs/build with some exceptions.
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter BrayCOMPONENT_POST_INSTALL_ACTION += \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray ($(MKDIR) $(PROTODOCDIR) ; \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray cd $(COMPONENT_SRC_DOC)/build ; \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray find . \( -name '_sources' \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray -o -name '.doctrees' \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray -o -name '.buildinfo' \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray -o -name 'objects.inv' \) \
cd348e325366620fe047edcc849e3c9424828599Peter Bray -prune -o -print0 \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray | cpio -pd0u $(PROTODOCDIR))
cd348e325366620fe047edcc849e3c9424828599Peter Bray
cd348e325366620fe047edcc849e3c9424828599Peter BrayREQUIRED_PACKAGES += library/gnutls
d2a02e104622a26dd90fa88f4f17188f2039809fPeter BrayREQUIRED_PACKAGES += library/json-c
cd348e325366620fe047edcc849e3c9424828599Peter BrayREQUIRED_PACKAGES += library/libestr
cd348e325366620fe047edcc849e3c9424828599Peter BrayREQUIRED_PACKAGES += library/liblogging
cd348e325366620fe047edcc849e3c9424828599Peter BrayREQUIRED_PACKAGES += library/zlib
cd348e325366620fe047edcc849e3c9424828599Peter BrayREQUIRED_PACKAGES += security/kerberos-5
cd348e325366620fe047edcc849e3c9424828599Peter BrayREQUIRED_PACKAGES += shell/ksh93
cd348e325366620fe047edcc849e3c9424828599Peter BrayREQUIRED_PACKAGES += system/core-os
cd348e325366620fe047edcc849e3c9424828599Peter Bray