Marcel Telka
2022-08-08 fdb4214370321159cf0ec37b2a69fe2236967e29
make-rules: prep.mk must be included before $(BUILD_STYLE).mk

2 files added
2 files modified
96 ■■■■■ changed files
make-rules/common.mk 12 ●●●●● patch | view | raw | blame | history
make-rules/makemaker-defaults.mk 41 ●●●●● patch | view | raw | blame | history
make-rules/makemaker.mk 27 ●●●●● patch | view | raw | blame | history
make-rules/modulebuild-defaults.mk 16 ●●●●● patch | view | raw | blame | history
make-rules/common.mk
@@ -28,6 +28,14 @@
# userland components.
#
# Assume components use a configure script-style build by default.
BUILD_STYLE ?= configure
# Some build styles might want to set some defaults before prep.mk is included.
-include $(WS_MAKE_RULES)/$(strip $(BUILD_STYLE))-defaults.mk
include $(WS_MAKE_RULES)/prep.mk
# Override this to limit builds and publication to a single architecture.
BUILD_ARCH ?= $(MACH)
ifneq ($(strip $(BUILD_ARCH)),$(MACH))
@@ -42,8 +50,6 @@
SYSTEM_TEST_TARGET ?= target-na
endif
# Assume components use a configure script-style build by default.
BUILD_STYLE ?= configure
# If not an archive build (i.e. extract and copy) or pkg build (publish only),
# include relevant makefile.
ifneq ($(strip $(BUILD_STYLE)),archive)
@@ -51,8 +57,6 @@
include $(WS_MAKE_RULES)/$(strip $(BUILD_STYLE)).mk
endif
endif
include $(WS_MAKE_RULES)/prep.mk
ifeq ($(strip $(BUILD_STYLE)),configure)
# Assume these items should always be set in the configure environment.  strip
make-rules/makemaker-defaults.mk
New file
@@ -0,0 +1,41 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright 2022 Marcel Telka
#
# Component defaults
COMPONENT_VERSION ?=        $(shell $(WS_TOOLS)/perl-version-convert $(COMPONENT_NAME) $(HUMAN_VERSION))
COMPONENT_CLASSIFICATION ?=    Development/Perl
COMPONENT_SRC ?=        $(COMPONENT_NAME)-$(HUMAN_VERSION)
COMPONENT_ARCHIVE ?=        $(COMPONENT_SRC).tar.gz
COMPONENT_FMRI ?=        library/perl-5/$(shell echo $(COMPONENT_NAME) | tr [A-Z]_ [a-z]-)
ifneq ($(strip $(COMPONENT_PERL_MODULE)),)
COMPONENT_PERL_DISTRIBUTION ?=    $(subst ::,-,$(COMPONENT_PERL_MODULE))
COMPONENT_PROJECT_URL ?=    https://metacpan.org/pod/$(COMPONENT_PERL_MODULE)
endif
ifneq ($(strip $(COMPONENT_PERL_DISTRIBUTION)),)
COMPONENT_NAME ?=        $(COMPONENT_PERL_DISTRIBUTION)
endif
ifneq ($(strip $(COMPONENT_CPAN_AUTHOR)),)
COMPONENT_CPAN_AUTHOR1 =    $(shell echo $(COMPONENT_CPAN_AUTHOR) | cut -c 1)
COMPONENT_CPAN_AUTHOR2 =    $(shell echo $(COMPONENT_CPAN_AUTHOR) | cut -c 1-2)
COMPONENT_CPAN_AUTHOR_URL =    $(COMPONENT_CPAN_AUTHOR1)/$(COMPONENT_CPAN_AUTHOR2)/$(COMPONENT_CPAN_AUTHOR)
COMPONENT_ARCHIVE_URL ?=    https://cpan.metacpan.org/authors/id/$(COMPONENT_CPAN_AUTHOR_URL)/$(COMPONENT_ARCHIVE)
endif
# Enable ASLR by default.  Component could disable ASLR by setting
# COMPONENT_ASLR to 'no'.
ifeq ($(strip $(COMPONENT_ASLR)),no)
ASLR_MODE = $(ASLR_DISABLE)
else
ASLR_MODE = $(ASLR_ENABLE)
endif
make-rules/makemaker.mk
@@ -21,33 +21,6 @@
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
#
# Component defaults
COMPONENT_VERSION ?=        $(shell $(WS_TOOLS)/perl-version-convert $(COMPONENT_NAME) $(HUMAN_VERSION))
COMPONENT_CLASSIFICATION ?=    Development/Perl
COMPONENT_SRC ?=        $(COMPONENT_NAME)-$(HUMAN_VERSION)
COMPONENT_ARCHIVE ?=        $(COMPONENT_SRC).tar.gz
COMPONENT_FMRI ?=        library/perl-5/$(shell echo $(COMPONENT_NAME) | tr [A-Z]_ [a-z]-)
ifneq ($(strip $(COMPONENT_PERL_MODULE)),)
COMPONENT_PERL_DISTRIBUTION ?=    $(subst ::,-,$(COMPONENT_PERL_MODULE))
COMPONENT_PROJECT_URL ?=    https://metacpan.org/pod/$(COMPONENT_PERL_MODULE)
endif
ifneq ($(strip $(COMPONENT_PERL_DISTRIBUTION)),)
COMPONENT_NAME ?=        $(COMPONENT_PERL_DISTRIBUTION)
endif
ifneq ($(strip $(COMPONENT_CPAN_AUTHOR)),)
COMPONENT_CPAN_AUTHOR1 =    $(shell echo $(COMPONENT_CPAN_AUTHOR) | cut -c 1)
COMPONENT_CPAN_AUTHOR2 =    $(shell echo $(COMPONENT_CPAN_AUTHOR) | cut -c 1-2)
COMPONENT_CPAN_AUTHOR_URL =    $(COMPONENT_CPAN_AUTHOR1)/$(COMPONENT_CPAN_AUTHOR2)/$(COMPONENT_CPAN_AUTHOR)
COMPONENT_ARCHIVE_URL ?=    https://cpan.metacpan.org/authors/id/$(COMPONENT_CPAN_AUTHOR_URL)/$(COMPONENT_ARCHIVE)
endif
# Enable ASLR by default.  Component could disable ASLR by setting
# COMPONENT_ASLR to 'no'.
ifeq ($(strip $(COMPONENT_ASLR)),no)
ASLR_MODE = $(ASLR_DISABLE)
else
ASLR_MODE = $(ASLR_ENABLE)
endif
# Common perl environment
COMMON_PERL_ENV +=    MAKE=$(GMAKE)
COMMON_PERL_ENV +=    PATH=$(dir $(CC)):$(SPRO_VROOT)/bin:$(PATH)
make-rules/modulebuild-defaults.mk
New file
@@ -0,0 +1,16 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source.  A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright 2022 Marcel Telka
#
include $(WS_MAKE_RULES)/makemaker-defaults.mk