components/libtool/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Thu, 08 Mar 2012 14:30:15 -0800
changeset 725 c3d04b0fa1ca
parent 708 2cb7fdf18c3d
child 800 2ad056ed89ec
permissions -rw-r--r--
7101897 libtool contains some automount paths
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
127
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     1
#
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     3
#
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     7
#
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    12
#
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
#
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    20
#
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    21
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    22
#
708
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    23
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
127
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
#
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    25
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    26
include ../../make-rules/shared-macros.mk
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    27
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    28
COMPONENT_NAME=		libtool
708
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    29
COMPONENT_VERSION=	2.4.2
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 181
diff changeset
    30
COMPONENT_PROJECT_URL=	http://www.gnu.org/software/libtool/
127
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    31
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    32
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
708
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    33
COMPONENT_ARCHIVE_HASH=	sha1:22b71a8b5ce3ad86e1094e7285981cae10e6ff88
127
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    34
COMPONENT_ARCHIVE_URL=	http://ftp.gnu.org/gnu/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    35
708
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    36
# For now, we want to continue to provide the libltdl.so's (and their
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    37
# links) from libtool 1.5.22.
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    38
#
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    39
COMPONENT_VERSION_1 =	1.5.22
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    40
COMPONENT_SRC_1 =	$(COMPONENT_NAME)-$(COMPONENT_VERSION_1)
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    41
COMPONENT_ARCHIVE_1 =	$(COMPONENT_SRC_1).tar.gz
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    42
COMPONENT_ARCHIVE_HASH_1 = sha1:17353e66aeaac80ae188ea0a3a90609550ce3254
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    43
COMPONENT_ARCHIVE_URL_1 = http://ftp.gnu.org/gnu/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE_1)
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    44
SOURCE_DIR_1 =		$(COMPONENT_DIR)/$(COMPONENT_SRC_1)
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    45
127
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    46
include $(WS_TOP)/make-rules/prep.mk
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    47
include $(WS_TOP)/make-rules/configure.mk
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    48
include $(WS_TOP)/make-rules/ips.mk
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    49
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    50
CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    51
CONFIGURE_OPTIONS  +=		--disable-static
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    52
CONFIGURE_OPTIONS  +=		CFLAGS="$(CFLAGS)"
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    53
CONFIGURE_OPTIONS  +=		PERL="$(PERL)"
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    54
708
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    55
COMPONENT_PREP_ACTION = (cd $(@D) ; ./bootstrap)
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    56
725
c3d04b0fa1ca 7101897 libtool contains some automount paths
Rich Burridge <rich.burridge@oracle.com>
parents: 708
diff changeset
    57
# Remove the hard-wired compiler locations in the LTCC and two CC lines
c3d04b0fa1ca 7101897 libtool contains some automount paths
Rich Burridge <rich.burridge@oracle.com>
parents: 708
diff changeset
    58
# in the two versions of the libtool script.
c3d04b0fa1ca 7101897 libtool contains some automount paths
Rich Burridge <rich.burridge@oracle.com>
parents: 708
diff changeset
    59
COMPONENT_POST_INSTALL_ACTION = \
c3d04b0fa1ca 7101897 libtool contains some automount paths
Rich Burridge <rich.burridge@oracle.com>
parents: 708
diff changeset
    60
	(for dir in $(PROTOUSRBINDIR) $(PROTOUSRBINDIR)/$(MACH64) ; do \
c3d04b0fa1ca 7101897 libtool contains some automount paths
Rich Burridge <rich.burridge@oracle.com>
parents: 708
diff changeset
    61
		cd $$dir; \
c3d04b0fa1ca 7101897 libtool contains some automount paths
Rich Burridge <rich.burridge@oracle.com>
parents: 708
diff changeset
    62
		/usr/gnu/bin/sed -i \
c3d04b0fa1ca 7101897 libtool contains some automount paths
Rich Burridge <rich.burridge@oracle.com>
parents: 708
diff changeset
    63
			-e 's|^LTCC="/.*$$|LTCC="cc"|' \
c3d04b0fa1ca 7101897 libtool contains some automount paths
Rich Burridge <rich.burridge@oracle.com>
parents: 708
diff changeset
    64
			-e 's|^CC="/.*$$|CC="cc"|' libtool ; \
c3d04b0fa1ca 7101897 libtool contains some automount paths
Rich Burridge <rich.burridge@oracle.com>
parents: 708
diff changeset
    65
	done)
c3d04b0fa1ca 7101897 libtool contains some automount paths
Rich Burridge <rich.burridge@oracle.com>
parents: 708
diff changeset
    66
708
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    67
# Macros to configure, build, and install the old version for the time being.
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    68
BUILD_OLD_DIR_32 = $(COMPONENT_DIR)/build/$(COMPONENT_VERSION_1)-$(MACH32)
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    69
BUILD_OLD_DIR_64 = $(COMPONENT_DIR)/build/$(COMPONENT_VERSION_1)-$(MACH64)
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    70
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    71
$(BUILD_OLD_DIR_32)/.configured: CONFIGURE_SCRIPT = $(SOURCE_DIR_1)/configure
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    72
$(BUILD_OLD_DIR_64)/.configured: CONFIGURE_SCRIPT = $(SOURCE_DIR_1)/configure
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    73
$(BUILD_OLD_DIR_32)/.configured:	BITS=32
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    74
$(BUILD_OLD_DIR_64)/.configured:	BITS=64
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    75
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    76
BUILD_32 += $(BUILD_OLD_DIR_32)/.built
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    77
BUILD_64 += $(BUILD_OLD_DIR_64)/.built
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    78
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    79
INSTALL_32 += $(BUILD_OLD_DIR_32)/.installed
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    80
INSTALL_64 += $(BUILD_OLD_DIR_64)/.installed
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    81
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    82
# install the old version first
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    83
$(BUILD_DIR_32)/.installed:	$(BUILD_OLD_DIR_32)/.installed
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    84
$(BUILD_DIR_64)/.installed:	$(BUILD_OLD_DIR_64)/.installed
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    85
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    86
# we need to prep the old version too (this should be handled in prep.mk)
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    87
$(SOURCE_DIR_1)/.unpacked:        download Makefile $(PATCHES)
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    88
	$(RM) -r $(SOURCE_DIR_1)
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    89
	$(UNPACK) $(UNPACK_ARGS) $(COMPONENT_ARCHIVE_1)
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    90
	$(TOUCH) $@
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    91
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    92
# prep the old version first
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    93
$(SOURCE_DIR)/.prep:	$(SOURCE_DIR_1)/.prep
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    94
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    95
$(SOURCE_DIR_1)/.prep:        $(SOURCE_DIR_1)/.unpacked
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    96
	$(TOUCH) $@
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    97
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    98
prep::	$(SOURCE_DIR_1)/.prep
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
    99
2cb7fdf18c3d PSARC 2012/053 libtool 2.4.2
Rich Burridge <rich.burridge@oracle.com>
parents: 609
diff changeset
   100
127
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   101
# common targets
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   102
build:		$(BUILD_32_and_64)
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   103
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   104
install:	$(INSTALL_32_and_64)
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   105
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 127
diff changeset
   106
test:		$(TEST_32_and_64)
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 127
diff changeset
   107
127
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   108
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   109
3e3c266b3a81 7013705 userland build needs local tarball caching
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
   110
include $(WS_TOP)/make-rules/depend.mk