make-rules/makemaker.mk
branchs11u3-sru
changeset 7711 48f87ff8204e
parent 3996 20c0f21bbe1e
equal deleted inserted replaced
7709:e38357099235 7711:48f87ff8204e
    16 # fields enclosed by brackets "[]" replaced with your own identifying
    16 # fields enclosed by brackets "[]" replaced with your own identifying
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
    18 #
    18 #
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
    21 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
    21 
       
    22 #
       
    23 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
    22 #
    24 #
    23 
    25 
    24 # we only do 32 bit perl for now.
    26 # makemaker.mk is used to build, install, test perl modules for
    25 BITS=32
    27 # each version of perl.
       
    28 # Packaging these multiple versions is still handled by ips.mk.
       
    29 # Look under perl_modules for examples of usage.
    26 
    30 
    27 COMMON_PERL_ENV +=	MAKE=$(GMAKE)
    31 # Multiple versions of perl processing is achieved by listing targets
    28 COMMON_PERL_ENV +=	PATH=$(dir $(CC)):$(SPRO_VROOT)/bin:$(PATH)
    32 # for each version and adding BUILD_64/INSTALL_64 targets below.
    29 COMMON_PERL_ENV +=	LANG=""
    33 # Example:
    30 COMMON_PERL_ENV +=	CC="$(CC)"
    34 # $(BUILD_DIR)/$(MACH64)-5.24/.configured: PERL_VERSION=5.24
    31 COMMON_PERL_ENV +=	CFLAGS="$(PERL_OPTIMIZE)"
    35 # $(BUILD_DIR)/$(MACH64)-5.24/.configured: BITS=64
       
    36 # BUILD_64 +=     $(BUILD_DIR)/$(MACH64)-5.24/.built
       
    37 # INSTALL_64 +=   $(BUILD_DIR)/$(MACH64)-5.24/.installed
       
    38 # TEST_64 +=      $(BUILD_DIR)/$(MACH64)-5.24/.tested
       
    39 # TEST_64 +=      $(BUILD_DIR)/$(MACH64)-5.24/.tested-and-compared
       
    40 # and so on.
       
    41 
       
    42 COMMON_PERL_ENV += MAKE=$(GMAKE)
       
    43 COMMON_PERL_ENV += PATH=$(dir $(CC)):$(SPRO_VROOT)/bin:$(PATH)
       
    44 COMMON_PERL_ENV += LANG=""
       
    45 COMMON_PERL_ENV += CC="$(CC)"
       
    46 COMMON_PERL_ENV += CFLAGS="$(PERL_OPTIMIZE)"
    32 
    47 
    33 # Yes.  Perl is just scripts, for now, but we need architecture
    48 # Yes.  Perl is just scripts, for now, but we need architecture
    34 # directories so that it populates all architecture prototype
    49 # directories so that it populates all architecture prototype
    35 # directories.
    50 # directories.
    36 PERLBD_ARCH = $(BUILD_DIR)/$(MACH32)
       
    37 
    51 
    38 $(PERLBD_ARCH)-5.8.4/.configured:		PERL_VERSION=5.8.4
    52 $(BUILD_DIR)/$(MACH32)-5.8.4/.configured:	PERL_VERSION=5.8.4
    39 $(PERLBD_ARCH)-5.12/.configured:		PERL_VERSION=5.12
    53 $(BUILD_DIR)/$(MACH32)-5.8.4/.configured:	BITS=32
    40 $(PERLBD_ARCH)-5.12-mt/.configured:		PERL_VERSION=5.12-mt
    54 $(BUILD_DIR)/$(MACH32)-5.12/.configured:	PERL_VERSION=5.12
       
    55 $(BUILD_DIR)/$(MACH32)-5.12/.configured:	BITS=32
       
    56 $(BUILD_DIR)/$(MACH32)-5.12-mt/.configured:	PERL_VERSION=5.12-mt
       
    57 $(BUILD_DIR)/$(MACH32)-5.12-mt/.configured:	BITS=32
       
    58 $(BUILD_DIR)/$(MACH64)-5.22/.configured:	PERL_VERSION=5.22
       
    59 $(BUILD_DIR)/$(MACH64)-5.22/.configured:	BITS=64
    41 
    60 
    42 BUILD_32 =	$(PERL_VERSIONS:%=$(PERLBD_ARCH)-%/.built)
    61 $(BUILD_DIR)/$(MACH32)-5.8.4/.tested:		PERL_VERSION=5.8.4
    43 INSTALL_32 =	$(BUILD_32:%/.built=%/.installed)
    62 $(BUILD_DIR)/$(MACH32)-5.8.4/.tested:		BITS=32
    44 TEST_32 =	$(BUILD_32:%/.built=%/.tested)
    63 $(BUILD_DIR)/$(MACH32)-5.12/.tested:		PERL_VERSION=5.12
       
    64 $(BUILD_DIR)/$(MACH32)-5.12/.tested:		BITS=32
       
    65 $(BUILD_DIR)/$(MACH32)-5.12-mt/.tested:		PERL_VERSION=5.12-mt
       
    66 $(BUILD_DIR)/$(MACH32)-5.12-mt/.tested:		BITS=32
       
    67 $(BUILD_DIR)/$(MACH64)-5.22/.tested:		PERL_VERSION=5.22
       
    68 $(BUILD_DIR)/$(MACH64)-5.22/.tested:		BITS=64
    45 
    69 
       
    70 # This macro is building this:
       
    71 # BUILD_64 = $(BUILD_DIR)/$(MACH64)-5.22/.built
       
    72 PERL_BUILD = $(BUILD_DIR)/MACHX-PERLVER/.built
       
    73 BUILD_32_and_64_PERL = $(foreach v,$(PERL_VERSIONS),$(shell echo $(PERL_BUILD) | sed -e 's/MACHX/$(PERL.$(v).BITS)/g' -e 's/-PERLVER/-$(v)/g'))
    46 
    74 
    47 COMPONENT_CONFIGURE_ENV +=	$(COMMON_PERL_ENV)
    75 # This macro is building this:
    48 COMPONENT_CONFIGURE_ENV +=	PERL="$(PERL)"
    76 # INSTALL_64 =$(BUILD_DIR)/$(MACH64)-5.22/.installed
    49 $(PERLBD_ARCH)-%/.configured:	$(SOURCE_DIR)/.prep
    77 PERL_INSTALL = $(BUILD_DIR)/MACHX-PERLVER/.installed
       
    78 INSTALL_32_and_64_PERL = $(foreach v,$(PERL_VERSIONS),$(shell echo $(PERL_INSTALL) | sed -e 's/MACHX/$(PERL.$(v).BITS)/g' -e 's/-PERLVER/-$(v)/g'))
       
    79 
       
    80 # This macro is building this:
       
    81 # TEST_64 = $(BUILD_DIR)/$(MACH64)-5.22/.tested
       
    82 PERL_TEST = $(BUILD_DIR)/MACHX-PERLVER/.tested
       
    83 TEST_32_and_64_PERL = $(foreach v,$(PERL_VERSIONS),$(shell echo $(PERL_TEST) | sed -e 's/MACHX/$(PERL.$(v).BITS)/g' -e 's/-PERLVER/-$(v)/g'))
       
    84 
       
    85 COMPONENT_CONFIGURE_ENV += $(COMMON_PERL_ENV)
       
    86 COMPONENT_CONFIGURE_ENV += PERL="$(PERL)"
       
    87 $(BUILD_DIR)/%/.configured:	$(SOURCE_DIR)/.prep
    50 	($(RM) -r $(@D) ; $(MKDIR) $(@D))
    88 	($(RM) -r $(@D) ; $(MKDIR) $(@D))
    51 	$(CLONEY) $(SOURCE_DIR) $(@D)
    89 	$(CLONEY) $(SOURCE_DIR) $(@D)
    52 	$(COMPONENT_PRE_CONFIGURE_ACTION)
    90 	$(COMPONENT_PRE_CONFIGURE_ACTION)
    53 	(cd $(@D) ; $(COMPONENT_CONFIGURE_ENV) $(PERL) $(PERL_FLAGS) \
    91 	(cd $(@D) ; $(COMPONENT_CONFIGURE_ENV) $(PERL) $(PERL_FLAGS) \
    54 				Makefile.PL $(CONFIGURE_OPTIONS))
    92 				Makefile.PL $(CONFIGURE_OPTIONS))
    55 	$(COMPONENT_POST_CONFIGURE_ACTION)
    93 	$(COMPONENT_POST_CONFIGURE_ACTION)
    56 	$(TOUCH) [email protected]
    94 	$(TOUCH) [email protected]
    57 
    95 
    58 
    96 
    59 COMPONENT_BUILD_ENV +=	$(COMMON_PERL_ENV)
    97 COMPONENT_BUILD_ENV +=	$(COMMON_PERL_ENV)
    60 $(PERLBD_ARCH)-%/.built:	$(PERLBD_ARCH)-%/.configured
    98 $(BUILD_DIR)/%/.built:	$(BUILD_DIR)/%/.configured
    61 	$(COMPONENT_PRE_BUILD_ACTION)
    99 	$(COMPONENT_PRE_BUILD_ACTION)
    62 	(cd $(@D) ; $(ENV) $(COMPONENT_BUILD_ENV) \
   100 	(cd $(@D) ; $(ENV) $(COMPONENT_BUILD_ENV) \
    63 		$(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
   101 		$(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
    64 	$(COMPONENT_POST_BUILD_ACTION)
   102 	$(COMPONENT_POST_BUILD_ACTION)
    65 ifeq   ($(strip $(PARFAIT_BUILD)),yes)
   103 ifeq   ($(strip $(PARFAIT_BUILD)),yes)
    69 
   107 
    70 
   108 
    71 COMPONENT_INSTALL_ARGS +=	DESTDIR="$(PROTO_DIR)"
   109 COMPONENT_INSTALL_ARGS +=	DESTDIR="$(PROTO_DIR)"
    72 COMPONENT_INSTALL_TARGETS =	install_vendor
   110 COMPONENT_INSTALL_TARGETS =	install_vendor
    73 COMPONENT_INSTALL_ENV +=	$(COMMON_PERL_ENV)
   111 COMPONENT_INSTALL_ENV +=	$(COMMON_PERL_ENV)
    74 $(PERLBD_ARCH)-%/.installed:	$(PERLBD_ARCH)-%/.built
   112 $(BUILD_DIR)/%/.installed:	$(BUILD_DIR)/%/.built
    75 	$(COMPONENT_PRE_INSTALL_ACTION)
   113 	$(COMPONENT_PRE_INSTALL_ACTION)
    76 	(cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) \
   114 	(cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) \
    77 			$(COMPONENT_INSTALL_ARGS) $(COMPONENT_INSTALL_TARGETS))
   115 			$(COMPONENT_INSTALL_ARGS) $(COMPONENT_INSTALL_TARGETS))
    78 	$(COMPONENT_POST_INSTALL_ACTION)
   116 	$(COMPONENT_POST_INSTALL_ACTION)
    79 	$(TOUCH) [email protected]
   117 	$(TOUCH) [email protected]
    80 
   118 
    81 
   119 
    82 COMPONENT_TEST_TARGETS =	check
   120 COMPONENT_TEST_TARGETS =	check
    83 COMPONENT_TEST_ENV +=	$(COMMON_PERL_ENV)
   121 COMPONENT_TEST_ENV +=		$(COMMON_PERL_ENV)
    84 $(PERLBD_ARCH)-%/.tested:	$(PERLBD_ARCH)-%/.built
   122 $(BUILD_DIR)/%/.tested:	$(BUILD_DIR)/%/.built
    85 	$(COMPONENT_PRE_TEST_ACTION)
   123 	$(COMPONENT_PRE_TEST_ACTION)
    86 	(cd $(@D) ; $(ENV) $(COMPONENT_TEST_ENV) $(GMAKE) \
   124 	(cd $(@D) ; $(ENV) $(COMPONENT_TEST_ENV) $(GMAKE) \
    87 			$(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS))
   125 			$(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS))
    88 	$(COMPONENT_POST_TEST_ACTION)
   126 	$(COMPONENT_POST_TEST_ACTION)
    89 	$(TOUCH) [email protected]
   127 	$(TOUCH) [email protected]
   105 REQUIRED_PACKAGES += runtime/perl-threaded-512
   143 REQUIRED_PACKAGES += runtime/perl-threaded-512
   106 endif
   144 endif
   107 ifneq ($(findstring 5.8.4, $(PERL_VERSIONS)),)
   145 ifneq ($(findstring 5.8.4, $(PERL_VERSIONS)),)
   108 REQUIRED_PACKAGES += runtime/perl-584
   146 REQUIRED_PACKAGES += runtime/perl-584
   109 endif
   147 endif
       
   148 ifneq ($(findstring 5.22, $(PERL_VERSIONS)),)
       
   149 REQUIRED_PACKAGES += runtime/perl-522
       
   150 endif